From 473e30e7fe960357ac1245c77b46f362d6fe7d6a Mon Sep 17 00:00:00 2001 From: Evert Prants Date: Mon, 22 Aug 2022 20:51:37 +0300 Subject: [PATCH] port and host in env --- src/main.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 863d019..c8b7914 100644 --- a/src/main.ts +++ b/src/main.ts @@ -46,6 +46,9 @@ async function bootstrap() { app.setBaseViewsDir(join(__dirname, '..', 'views')); app.setViewEngine('pug'); - await app.listen(3000, '0.0.0.0'); + await app.listen( + parseInt(process.env.NEST_PORT, 10) || 3000, + process.env.NEST_HOST || '0.0.0.0', + ); } bootstrap();