aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBuildTools <unconfigured@null.spigotmc.org>2017-09-27 10:02:40 +0200
committerBuildTools <unconfigured@null.spigotmc.org>2017-09-27 10:02:40 +0200
commit4a2d7311cef683a66f77b81d9fb1f4c53e4ca01d (patch)
tree658d8eaece06456c7c66d4d7f369e24877ab6702
parent404 (diff)
404
-rw-r--r--app.js7
-rw-r--r--public/404.html2
2 files changed, 7 insertions, 2 deletions
diff --git a/app.js b/app.js
index e4a1c71..4ad24b0 100644
--- a/app.js
+++ b/app.js
@@ -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>