Takes in a structured set of routes and transforms them into an express router
{
'routes': {
'/': {
'get': function (req, res, next) {
}
'post': function(req, res, next) {
}
},
'/user': {
'get': function (req, res, next) {
}
}
},
'helpers': {
// functions that are used in routes that you might want to unit test
}
}
var routebuilder = require('routebuilder')
var userRoutes = require('./routes/index')
app.use('/', routebuilder(userRoutes))