🔐 adds .env configuration of listening port
parent
af51b63d66
commit
46d4c48abc
|
|
@ -1,9 +1,10 @@
|
|||
import { NestFactory } from '@nestjs/core';
|
||||
import { AppModule } from './app.module';
|
||||
import 'dotenv/config';
|
||||
import * as process from 'node:process';
|
||||
|
||||
async function bootstrap() {
|
||||
const app = await NestFactory.create(AppModule);
|
||||
await app.listen(3030);
|
||||
await app.listen(process.env.PORT || 3000);
|
||||
}
|
||||
bootstrap();
|
||||
|
|
|
|||
Loading…
Reference in New Issue