Skip to content

Commit 4f727fe

Browse files
authored
feat: production에서 combined로 로깅 (#401)
1 parent 1ae7ba0 commit 4f727fe

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

server/config/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ export default {
1515
CLIENT_PATH: process.env.CLIENT_PATH,
1616
PORT: process.env.PORT,
1717
SOCKET_PATH: process.env.WEBSOCKET_PATH,
18+
NODE_ENV: process.env.NODE_ENV,
1819
};

server/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import morgan from 'morgan';
1212
import { Server } from 'socket.io';
1313

1414
const app = express();
15-
app.use(morgan('dev'));
15+
app.use(env.NODE_ENV === 'production' ? morgan('combined') : morgan('dev'));
1616
app.use(express.json());
1717
app.use(cookieParser(env.COOKIE_SECRET_KEY));
1818
app.use(cors());

0 commit comments

Comments
 (0)