akb-cli
Version:
akb cli
48 lines (37 loc) • 864 B
JavaScript
/**
* @file routes config
* @author akb
*/
;
module.exports = {
enableDefaultRoutes: true,
routes: {
'/': {
controller: 'index',
action: 'index'
},
// 错误页
'/error/:action': {
controller: 'error',
action: '{action}'
},
// 静态文件
'/assets/(.*)': {
type: 'static',
target: '/assets/{0}',
root: './dist',
etag: true,
// max age
maxAge: 1 * 365 * 24 * 3600 * 1000,
dotfiles: 'deny',
extensions: false,
index: false
},
'/favicon.ico': {
type: 'static',
target: '/favicon.ico',
root: './public',
maxAge: 1 * 365 * 24 * 3600 * 1000
}
}
};