Get an express router that can be used to expose HTTP endpoints
module.exports = ({ app, getRouter }) => {
// Get an express router to expose new HTTP endpoints
const router = getRouter('/my-app');
// Use any middleware
router.use(require('express').static(__dirname + '/public'));
// Add a new route
router.get('/hello-world', (req, res) => {
res.end('Hello World');
});
};
the prefix for the routes* @param path
Generated using TypeDoc
The
app
parameter available toApplicationFunction
s{logger} log - A logger