mirror of
https://github.com/MisskeyIO/misskey
synced 2024-12-04 01:38:48 +09:00
make logger great again
This commit is contained in:
parent
d87e3a0ee3
commit
45b6a6bc54
@ -56,6 +56,7 @@
|
||||
"@types/koa-bodyparser": "4.2.0",
|
||||
"@types/koa-compress": "^2.0.8",
|
||||
"@types/koa-favicon": "2.0.19",
|
||||
"@types/koa-logger": "^3.1.0",
|
||||
"@types/koa-mount": "3.0.1",
|
||||
"@types/koa-multer": "1.0.0",
|
||||
"@types/koa-router": "7.0.27",
|
||||
@ -141,6 +142,7 @@
|
||||
"koa-compress": "3.0.0",
|
||||
"koa-favicon": "2.0.1",
|
||||
"koa-json-body": "^5.3.0",
|
||||
"koa-logger": "^3.2.0",
|
||||
"koa-mount": "3.0.0",
|
||||
"koa-multer": "1.0.2",
|
||||
"koa-router": "7.4.0",
|
||||
|
@ -10,6 +10,7 @@ import * as Koa from 'koa';
|
||||
import * as Router from 'koa-router';
|
||||
import * as mount from 'koa-mount';
|
||||
import * as compress from 'koa-compress';
|
||||
import * as logger from 'koa-logger';
|
||||
|
||||
import activityPub from './activitypub';
|
||||
import webFinger from './webfinger';
|
||||
@ -19,6 +20,12 @@ import config from '../config';
|
||||
const app = new Koa();
|
||||
app.proxy = true;
|
||||
|
||||
if (process.env.NODE_ENV != 'production') {
|
||||
// Logger
|
||||
app.use(logger());
|
||||
}
|
||||
|
||||
// Compress response
|
||||
app.use(compress({
|
||||
flush: zlib.constants.Z_SYNC_FLUSH
|
||||
}));
|
||||
|
Loading…
Reference in New Issue
Block a user