Starter Kit
Commands
npm start
will start server at 3001 portnpm test
will run project tests
API Concepts
Controllers
Each endpoints controller should have a setup function, which is responsible for routing for such specific controller, for ex.
// controllers/my-controller.js
function pong(req, res) {
res.set({ 'Content-Type': 'text/plain' });
res.end('pong');
}
module.exports = {
pong,
// draw all controller specific routes here
setup(router) {
router.get('/ping', pong)
}
};