Last active
May 23, 2020 12:52
-
-
Save madebydin/82466bd53a7d36e39bb26ac88ee3efe6 to your computer and use it in GitHub Desktop.
main
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 { | |
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