summaryrefslogtreecommitdiff
path: root/src/server.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-01-19 16:00:14 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-01-19 16:00:14 +0900
commit241e328d935756021a6ea43dd56fc09270f38cfc (patch)
treed8658226ef4a8d5ed29d18024863e545d98c0eb7 /src/server.ts
parentMerge pull request #49 from syuilo/greenkeeper/file-type-4.1.0 (diff)
downloadmisskey-241e328d935756021a6ea43dd56fc09270f38cfc.tar.gz
misskey-241e328d935756021a6ea43dd56fc09270f38cfc.tar.bz2
misskey-241e328d935756021a6ea43dd56fc09270f38cfc.zip
#28
Diffstat (limited to 'src/server.ts')
-rw-r--r--src/server.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/server.ts b/src/server.ts
index 45ee5b1895..aa1627e028 100644
--- a/src/server.ts
+++ b/src/server.ts
@@ -7,6 +7,7 @@ import * as http from 'http';
import * as https from 'https';
import * as cluster from 'cluster';
import * as express from 'express';
+import * as morgan from 'morgan';
import vhost = require('vhost');
import config from './conf';
@@ -17,6 +18,10 @@ import config from './conf';
const app = express();
app.disable('x-powered-by');
+// Log
+app.use(morgan(
+ process.env.NODE_ENV == 'production' ? 'combined' : 'dev'));
+
// Drop request that without 'Host' header
app.use((req, res, next) => {
if (!req.headers['host']) {