Routes for Baxel
npm install --save baxel-route
Prepare root routes
var route = require('baxel-route')
// Returns a koa-router instance
, router = route({
// Root
root: 'home#index',
// namespace example
example: {
index: { get: 'example#index' },
search: { get: 'example#search' },
}
});
Prepare subdomain routes, subdomain are used by baxel and its used with vhost
var route = require('baxel-route')
// Returns a koa-router instance
, router = route({
subdomain: ['subdomain', 'subdomain-dev'],
// Root
root: 'subdomain#index',
});
Doesn't support nested namespaces ATM
MIT