Skip to content
This repository has been archived by the owner on May 7, 2023. It is now read-only.

Commit

Permalink
Able to receive port from exposed env
Browse files Browse the repository at this point in the history
  • Loading branch information
hyochan committed Oct 3, 2021
1 parent bdb2b9e commit 04cbf59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const initializeApolloServer = (

export const startServer = async (
app: express.Application,
port = 4000,
port: number,
): Promise<Server> => {
const httpServer = createHttpServer(app);
const apollo = createApolloServer();
Expand All @@ -66,5 +66,5 @@ export const startServer = async (
if (process.env.NODE_ENV !== 'test') {
const app = createApp();

startServer(app);
startServer(app, PORT as number);
}

0 comments on commit 04cbf59

Please sign in to comment.