diff --git a/controller/status.js b/controller/status.js new file mode 100644 index 00000000..7c87af6d --- /dev/null +++ b/controller/status.js @@ -0,0 +1,3 @@ +module.exports = function controller( req, res, next) { + res.send('status: ok'); +}; diff --git a/routes/v1.js b/routes/v1.js index 592e6ce3..22dffa1b 100644 --- a/routes/v1.js +++ b/routes/v1.js @@ -19,7 +19,8 @@ var middleware = { var controllers = { mdToHTML: require('../controller/markdownToHtml'), place: require('../controller/place'), - search: require('../controller/search') + search: require('../controller/search'), + status: require('../controller/status') }; /** ----------------------- controllers ----------------------- **/ @@ -82,6 +83,9 @@ function addRoutes(app, peliasConfig) { postProc.renamePlacenames(), postProc.geocodeJSON(peliasConfig), postProc.sendJSON + ]), + status: createRouter([ + controllers.status ]) }; @@ -96,6 +100,8 @@ function addRoutes(app, peliasConfig) { app.get ( base + 'search', routers.search ); app.post( base + 'search', routers.search ); app.get ( base + 'reverse', routers.reverse ); + + app.get ( '/status', routers.status ); } /**