From 04cbf59c9b0c1ddda853168db0fcc8041bb18c8d Mon Sep 17 00:00:00 2001 From: hyochan Date: Sun, 3 Oct 2021 18:45:12 +0900 Subject: [PATCH] Able to receive port from exposed env --- server/src/server.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/server.ts b/server/src/server.ts index f2ae524ad..7df4c5fd7 100644 --- a/server/src/server.ts +++ b/server/src/server.ts @@ -49,7 +49,7 @@ const initializeApolloServer = ( export const startServer = async ( app: express.Application, - port = 4000, + port: number, ): Promise => { const httpServer = createHttpServer(app); const apollo = createApolloServer(); @@ -66,5 +66,5 @@ export const startServer = async ( if (process.env.NODE_ENV !== 'test') { const app = createApp(); - startServer(app); + startServer(app, PORT as number); }