From cf003c32993d765726ad9de68f29365c0caf2026 Mon Sep 17 00:00:00 2001 From: "Cheng-Han, Wu" Date: Wed, 20 Apr 2016 18:19:29 +0800 Subject: [PATCH] Update to response not found if no any route matches the url --- app.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app.js b/app.js index 6fe0f48..8a8b206 100644 --- a/app.js +++ b/app.js @@ -434,6 +434,10 @@ app.get("/p/:shortid", response.showPublishSlide); app.get("/:noteId", response.showNote); //note actions app.get("/:noteId/:action", response.noteActions); +// response not found if no any route matches +app.get('*', function (req, res) { + response.errorNotFound(res); +}); //socket.io secure io.use(realtime.secure);