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 | |
parent | 404 (diff) |
404
-rw-r--r-- | app.js | 7 | ||||
-rw-r--r-- | public/404.html | 2 |
2 files changed, 7 insertions, 2 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() { diff --git a/public/404.html b/public/404.html index b73acb6..2b40c91 100644 --- a/public/404.html +++ b/public/404.html @@ -13,7 +13,7 @@ <div> <div class="row"> <h1>404</h1> - <h2>Teapot not found</h2> + <p>Teapot not found</p> </div> </div> </body> |