summaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
authorWu Cheng-Han2015-12-30 00:33:36 -0500
committerWu Cheng-Han2015-12-30 00:33:36 -0500
commitf5010af4f1c90ca518ba6983ba009c9c47743240 (patch)
tree547678f1294be005893111d7aafadc6a88ddcb9d /app.js
parent5467e6da8debc35befd5891bbe393a22f269117d (diff)
Added 404 and 403 status on routes
Diffstat (limited to 'app.js')
-rw-r--r--app.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/app.js b/app.js
index 64b5b5f8..cf82f443 100644
--- a/app.js
+++ b/app.js
@@ -141,6 +141,14 @@ app.set('views', __dirname + '/public');
app.engine('html', ejs.renderFile);
//get index
app.get("/", response.showIndex);
+//get 403 forbidden
+app.get("/403", function(req, res) {
+ response.errorForbidden(res);
+});
+//get 404 not found
+app.get("/404", function(req, res) {
+ response.errorNotFound(res);
+});
//get status
app.get("/status", function (req, res, next) {
realtime.getStatus(function (data) {