v3: port static pages, make routes lib more flexible, share middlewares between v2 and v3, port v1, simplify server.js

This commit is contained in:
Matteo Pagliazzi
2016-03-30 17:20:01 +02:00
parent e54bd0f364
commit 6cbbdcdcbe
24 changed files with 420 additions and 267 deletions
+21
View File
@@ -0,0 +1,21 @@
let api = {};
/**
* @api {get} /status Get Habitica's status
* @apiVersion 3.0.0
* @apiName GetStatus
* @apiGroup Status
*
* @apiSuccess {status} string 'up' if everything is ok
*/
api.getStatus = {
method: 'GET',
url: '/status',
async handler (req, res) {
res.respond(200, {
status: 'up',
});
},
};
module.exports = api;