mirror of
https://github.com/filecoin-project/slate.git
synced 2024-12-24 01:23:08 +03:00
morgan: added logging
This commit is contained in:
parent
a61723d81c
commit
85e999a20b
@ -67,6 +67,7 @@
|
||||
"knex": "^0.21.5",
|
||||
"minisearch": "^2.5.1",
|
||||
"moment": "^2.27.0",
|
||||
"morgan": "^1.10.0",
|
||||
"next": "^9.5.2",
|
||||
"pg": "^8.3.3",
|
||||
"prismjs": "^1.20.0",
|
||||
|
@ -11,6 +11,7 @@ import express from "express";
|
||||
import next from "next";
|
||||
import compression from "compression";
|
||||
import cors from "cors";
|
||||
import morgan from "morgan";
|
||||
|
||||
const app = next({
|
||||
dev: !Environment.IS_PRODUCTION,
|
||||
@ -30,6 +31,9 @@ app.prepare().then(async () => {
|
||||
const server = express();
|
||||
|
||||
server.use(cors());
|
||||
server.use(
|
||||
morgan(":method :url :status :res[content-length] - :response-time ms")
|
||||
);
|
||||
|
||||
if (Environment.IS_PRODUCTION) {
|
||||
server.use(compression());
|
||||
|
Loading…
Reference in New Issue
Block a user