apps/api: fix expose port

This commit is contained in:
vchikalkin 2024-02-17 20:06:13 +03:00
parent 5ce9484e43
commit 5115551b0e
2 changed files with 7 additions and 1 deletions

View File

@ -5,6 +5,10 @@ const envSchema = z.object({
.string()
.transform((val) => Number.parseInt(val, 10))
.default('900'),
PORT: z
.string()
.transform((val) => Number.parseInt(val, 10))
.default('3001'),
REDIS_HOST: z.string(),
REDIS_PORT: z
.string()

View File

@ -1,4 +1,5 @@
import { AppModule } from './app.module';
import { env } from './config/env';
import { NestFactory } from '@nestjs/core';
import type { NestFastifyApplication } from '@nestjs/platform-fastify';
import { FastifyAdapter } from '@nestjs/platform-fastify';
@ -8,6 +9,7 @@ async function bootstrap() {
AppModule,
new FastifyAdapter(),
);
await app.listen(3001);
await app.listen(env.PORT, '0.0.0.0');
}
bootstrap();