From ae987b9e7fe61999a18e4bc675916bff26c6b7ff Mon Sep 17 00:00:00 2001 From: BuildTools Date: Wed, 27 Sep 2017 20:54:50 +0200 Subject: images --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index fbd1045..efb2989 100644 --- a/app.js +++ b/app.js @@ -31,7 +31,7 @@ app.get('/data', function(req, res) { }); app.get('/img/*', function (req, res) { - var img = fs.readFileSync(path + req.url.replace('/img', '')); + var img = fs.readFileSync(req.url.replace('/img', path)); res.writeHead(200, {'Content-Type': 'image/gif' }); res.end(img, 'binary'); }); -- cgit v1.2.3