mirror of
https://github.com/certd/certd.git
synced 2025-11-25 09:10:11 +08:00
refactor: export
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user