Skip to content

Instantly share code, notes, and snippets.

@kop7
Created August 12, 2020 18:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kop7/f3e7cada76e306446edaff256efa405d to your computer and use it in GitHub Desktop.
Save kop7/f3e7cada76e306446edaff256efa405d to your computer and use it in GitHub Desktop.
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