feat: update server port configuration to use environment variable
This commit is contained in:
1 parent
e99524a157
commit
d856dc1887
1 file changed
+2
-1
+2
-1
@@ -4,6 +4,7 @@ import { SnowflakeUtil } from './core/util/snowflake.util';
|
|||||||
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
|
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
|
||||||
import { GlobalExceptionFilter } from './core/exception/global-exception.filter';
|
import { GlobalExceptionFilter } from './core/exception/global-exception.filter';
|
||||||
import { GlobalValidationPipe } from './core/pipe/global-validation.pipe';
|
import { GlobalValidationPipe } from './core/pipe/global-validation.pipe';
|
||||||
|
import * as process from 'node:process';
|
||||||
|
|
||||||
async function bootstrap() {
|
async function bootstrap() {
|
||||||
SnowflakeUtil.initialize(
|
SnowflakeUtil.initialize(
|
||||||
@@ -30,6 +31,6 @@ async function bootstrap() {
|
|||||||
app.useGlobalPipes(new GlobalValidationPipe());
|
app.useGlobalPipes(new GlobalValidationPipe());
|
||||||
app.useGlobalFilters(new GlobalExceptionFilter());
|
app.useGlobalFilters(new GlobalExceptionFilter());
|
||||||
|
|
||||||
await app.listen(3000);
|
await app.listen(process.env.APP_PORT || 3000);
|
||||||
}
|
}
|
||||||
bootstrap();
|
bootstrap();
|
||||||
Reference in new issue
Block a user