node-framework
Version:
node-framework
35 lines (30 loc) • 867 B
JavaScript
/**
* @file routes.js ~ 2014-08-17 12:07
* @author sekiyika (px.pengxing@gmail.com)
* @description
*
*/
module.exports = {
'/heartBeat' : function (req, res, next) {
res.send('<!-- STATUS 200 -->');
},
'/assets/(.*)': {
// 指定当前请求是否为静态文件请求
type: 'static',
// 如果指定了target,则会用target的作为响应文件的name
target: '/assets/{0}',
// 以下配置参考 https://github.com/visionmedia/send#options
// 是否需要使用etag
etag: true,
// max age
maxAge: 1 * 365 * 24 * 3600 * 1000,
// 类似于.bashrc这类的文件配置访问许可 deny allow ignore
dotfiles: 'deny',
extensions: false,
index: false
},
'/(.*)': {
controller: 'wiki',
action: 'index'
}
};