From 3d21527e5b3b9baff4822863f168a02ef87e3979 Mon Sep 17 00:00:00 2001 From: Ido Kahlon Date: Tue, 3 Oct 2023 13:08:23 +0300 Subject: [PATCH] get port as env --- apps/velo-external-db/src/app.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/velo-external-db/src/app.ts b/apps/velo-external-db/src/app.ts index 70fc0f258..471935c79 100644 --- a/apps/velo-external-db/src/app.ts +++ b/apps/velo-external-db/src/app.ts @@ -34,7 +34,8 @@ export const createApp = async() => { const app = express() const initConnectorResponse = await initConnector() app.use(initConnectorResponse.externalDbRouter.router) - const server = app.listen(8080, () => console.log('Connector listening on port 8080')) + const port = process.env.PORT || 8080 + const server = app.listen(port, () => console.log(`Connector listening on port ${port}`)) return { server, ...initConnectorResponse, reload: () => initConnector() } }