diff --git a/src/main.ts b/src/main.ts index 9023cef..1a60008 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,8 +1,5 @@ -import type { - NestFastifyApplication} from '@nestjs/platform-fastify'; -import { - FastifyAdapter -} from '@nestjs/platform-fastify' +import type { NestFastifyApplication } from '@nestjs/platform-fastify' +import { FastifyAdapter } from '@nestjs/platform-fastify' import { NestFactory } from '@nestjs/core' import handlebars from 'hbs' @@ -10,7 +7,7 @@ import { join } from 'path' import { AppModule } from './app.module.js' -async function bootstrap() { +async function bootstrap(port: string | number) { const app = await NestFactory.create( AppModule, new FastifyAdapter() @@ -30,6 +27,7 @@ async function bootstrap() { templates: join(root, '..', 'views.dist'), }) - await app.listen(3000) + await app.listen(port) } -bootstrap() +bootstrap(11371) +bootstrap(process.env.LISTEN_PORT ?? 8080) \ No newline at end of file