Created
August 12, 2020 18:51
-
-
Save kop7/f3e7cada76e306446edaff256efa405d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NestFactory } from '@nestjs/core'; | |
import { AppModule } from './app.module'; | |
import { ConfigService } from './config/config.service'; | |
async function bootstrap() { | |
const configService = new ConfigService('.env'); | |
const app = await NestFactory.create(AppModule); | |
app.enableCors(); | |
app.setGlobalPrefix(configService.get('GLOBAL_PREFIX')); | |
await app.listen(configService.get('NODE_PORT')); | |
} | |
bootstrap(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment