Skip to content

Commit

Permalink
Merge pull request #4079 from beyondessential/hotfix-wcs-port-error
Browse files Browse the repository at this point in the history
Hotfix: Reference port safely when starting web-config-server
  • Loading branch information
chris-pollard authored Aug 9, 2022
2 parents c59815d + 0f4a3bc commit 173c93e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/web-config-server/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ async function start() {
const app = await createApp();

// process.env.PORT as per run command PORT=XXXX npm run dev
app.server.listen(process.env.PORT || 8080);
const port = process.env.PORT || 8080;
app.server.listen(port);
winston.debug('Logging at debug level');
winston.info('Server started', { port: app.server.address().port });
winston.info(`Running on port ${port}`);
const aggregationDescription = process.env.AGGREGATION_URL_PREFIX || 'production';
winston.info(`Connected to ${aggregationDescription} aggregation`);

Expand Down

0 comments on commit 173c93e

Please sign in to comment.