Skip to content

Commit eeca055

Browse files
davemarcoMarco
andauthored
fix(new-webui): Bind to host specified by host environment variable (fixes #951). (#954)
Co-authored-by: Marco <david.marcovitch@yscope.com>
1 parent 98acf70 commit eeca055

File tree

1 file changed

+1
-2
lines changed
  • components/log-viewer-webui/server/src

1 file changed

+1
-2
lines changed

components/log-viewer-webui/server/src/main.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import serviceApp from "./fastify-v2/app.js";
88

99

1010
const DEFAULT_FASTIFY_CLOSE_GRACE_DELAY = 500;
11-
const DEFAULT_PORT = 3000;
1211

1312
/**
1413
* Generates logger configuration options based on the environment.
@@ -59,7 +58,7 @@ const init = async (): Promise<void> => {
5958
await app.ready();
6059

6160
try {
62-
await app.listen({port: Number(process.env.PORT || DEFAULT_PORT)});
61+
await app.listen({host: app.config.HOST, port: app.config.PORT});
6362
} catch (err) {
6463
app.log.error(err);
6564
process.exit(1);

0 commit comments

Comments
 (0)