refactor: export

This commit is contained in:
xiaojunnuo
2021-02-09 18:40:29 +08:00
parent c3e374e6e5
commit b8000ca533
7 changed files with 161 additions and 20 deletions

View File

@@ -20,6 +20,8 @@ app.use(bodyparser({
}))
app.use(json())
app.use(logger())
// gzip
// app.use(compress({ threshold: 5120 }))
const staticPlugin = Static(pathUtil.join('public'), {
maxage: 30 * 24 * 60 * 3600,
@@ -27,9 +29,6 @@ const staticPlugin = Static(pathUtil.join('public'), {
})
app.use(staticPlugin)
// gzip
app.use(compress({ threshold: 2048 }))
// logger
app.use(async (ctx, next) => {
const start = new Date()