Skip to content

Commit

Permalink
Add host to listening log
Browse files Browse the repository at this point in the history
  • Loading branch information
henokgetachew committed Jul 18, 2023
1 parent bfca759 commit cb5f9a0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"coverage": "./tests/utils/init && NODE_ENV=test nyc ./node_modules/mocha/bin/mocha --timeout 10000 --require ts-node/register ./tests/*.spec.ts || true && ./tests/utils/destroy || true",
"e2e": "./tests/utils/init && NODE_ENV=test ./node_modules/mocha/bin/mocha --timeout 260000 --require ts-node/register ./tests/e2e/*.spec.ts || true && ./tests/utils/destroy || true",
"e2e-on-pre-existing-cluster": "./tests/utils/init-assume-cluster-exists && NODE_ENV=test ./node_modules/mocha/bin/mocha --timeout 260000 --require ts-node/register ./tests/e2e/*.spec.ts",
"build-docker-image": "docker build . -t medicmobile/upgrade-service:0.29",
"build-docker-image": "docker build . -t medicmobile/upgrade-service:0.31",
"build-docker-image-local": "docker build . -t medicmobile/upgrade-service:local"
},
"author": "Henok",
Expand Down
9 changes: 6 additions & 3 deletions src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,12 @@ app.get('/server-status',async (req: any, res: any) => {
});
});

const port = Environment.getUpgradeServicePort();
console.log(`Listening on port ${port}`);
const port = Number(Environment.getUpgradeServicePort());
const host = '0.0.0.0';
console.log(`Listening on host ${host} and port ${port}`);

export default app;

app.listen(port);
app.listen(port, host, () => {
console.log(`Server is running on ${host}:${port}`);
});

0 comments on commit cb5f9a0

Please sign in to comment.