aboutsummaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'app.js')
-rw-r--r--app.js6
1 files changed, 1 insertions, 5 deletions
diff --git a/app.js b/app.js
index 23d9fe3..8443bc8 100644
--- a/app.js
+++ b/app.js
@@ -31,11 +31,7 @@ app.get('/data', function(req, res) {
});
app.get('/img/*', function (req, res) {
- fs.readFile(path + req.url.replace('/img', ''), 'utf8', function(err, data) {
- if (err)
- return console.log(err);
- res.send(data);
- });
+ res.sendFile('/' + path + req.url.replace('/img', ''))
});
app.get('/', function(req, res) {