add example controller and lib to setup routes

This commit is contained in:
Matteo Pagliazzi
2015-11-15 22:40:00 +01:00
parent 83eb2308fb
commit 448ed70ab9
3 changed files with 40 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
// An example file to show how a controller should be structured
let api = {};
api.exampleRoute = {
method: 'GET',
url: '/example/:param',
middlewares: [],
handler (req, res) {
res.status(200).send({
status: 'ok'
});
},
};
export default api;