From 7c40a94ed3b7d699b3a74d8bf37139ea4c7753e7 Mon Sep 17 00:00:00 2001 From: 0xhardman <1142783160@qq.com> Date: Fri, 3 Nov 2023 14:04:57 +0800 Subject: [PATCH] add env of port --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 3ca7f8d..6503183 100644 --- a/src/main.ts +++ b/src/main.ts @@ -25,6 +25,6 @@ async function bootstrap() { app.useGlobalPipes(new ValidationPipe()); app.useGlobalInterceptors(new TransformInterceptor()); - await app.listen(3000); + await app.listen(process.env.PORT || 3000); } bootstrap();