From 9d78188f64847330edd119024a75828753aaaa5e Mon Sep 17 00:00:00 2001 From: Braydon Fuller Date: Thu, 7 Apr 2016 08:35:37 -0400 Subject: [PATCH] index: add not found --- lib/index.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/index.js b/lib/index.js index 468f7ea..a5d82a1 100644 --- a/lib/index.js +++ b/lib/index.js @@ -190,6 +190,15 @@ InsightAPI.prototype.setupRoutes = function(app) { }); app.get('/currency', currency.index.bind(currency)); + // Not Found + app.use(function(req, res) { + res.status(404).jsonp({ + status: 404, + url: req.originalUrl, + error: 'Not found' + }); + }); + }; InsightAPI.prototype.getPublishEvents = function() {