Skip to content

Instantly share code, notes, and snippets.

@madebydin
Last active May 23, 2020 12:52
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 madebydin/82466bd53a7d36e39bb26ac88ee3efe6 to your computer and use it in GitHub Desktop.
Save madebydin/82466bd53a7d36e39bb26ac88ee3efe6 to your computer and use it in GitHub Desktop.
main
import { NestFactory } from '@nestjs/core';
import {
FastifyAdapter,
NestFastifyApplication,
} from '@nestjs/platform-fastify';
import { AppModule } from './app.module';
import { ConfigService } from '@nestjs/config';
async function bootstrap() {
const app = await NestFactory.create<NestFastifyApplication>(
AppModule,
new FastifyAdapter()
);
const configService = app.get(ConfigService);
const host = configService.get('DBURL');
console.log("DB HOST : " + host);
await app.listen(3000);
}
bootstrap();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment