我有这个咖啡脚本代码:
dirs = ["/assets", "/public", "/locales", "/data/topo"]
app.configure ->
app.use assets(build : true)
jsPaths assets, console.log
@use(express.favicon(process.cwd() + "/assets/images/favicon.ico", {maxAge:maxAges}))
.use(express.compress())
.use(express.static(process.cwd() + "/assets", {maxAge:maxAges}))
.use(express.static(process.cwd() + "/public", {maxAge:maxAges}))
.use(express.static(process.cwd() + "/locales", {maxAge:maxAges}))
.use(express.static(process.cwd() + "/data/topo", {maxAge:maxAges}))
.use(express.logger('dev'))
.use(express.errorHandler(
dumpException: true
showStack: true
))
# Add template engine
我想为所有设置 maxAge ,dirs = ["/assets", "/public", "/locales", "/data/topo"]
这样做的正确方法是什么?
任何建议都值得赞赏。