aboutsummaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'app.js')
-rw-r--r--app.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/app.js b/app.js
index 8443bc8..fbd1045 100644
--- a/app.js
+++ b/app.js
@@ -31,7 +31,9 @@ app.get('/data', function(req, res) {
});
app.get('/img/*', function (req, res) {
- res.sendFile('/' + path + req.url.replace('/img', ''))
+ var img = fs.readFileSync(path + req.url.replace('/img', ''));
+ res.writeHead(200, {'Content-Type': 'image/gif' });
+ res.end(img, 'binary');
});
app.get('/', function(req, res) {