diff options
author | BuildTools <unconfigured@null.spigotmc.org> | 2017-09-27 10:02:40 +0200 |
---|---|---|
committer | BuildTools <unconfigured@null.spigotmc.org> | 2017-09-27 10:02:40 +0200 |
commit | 4a2d7311cef683a66f77b81d9fb1f4c53e4ca01d (patch) | |
tree | 658d8eaece06456c7c66d4d7f369e24877ab6702 /app.js | |
parent | 404 (diff) |
404
Diffstat (limited to 'app.js')
-rw-r--r-- | app.js | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -42,7 +42,12 @@ app.get('/', function(req, res) { }); app.get('*', function(req, res) { - res.status(404).send('Are you a teapot ?'); + console.log("404 - " + req.url); + fs.readFile('public/404.html', 'utf8', function(err, data) { + if (err) + return console.log(err); + res.status(404).send(data); + }); }); var server = app.listen(80, function() { |