forked from Cylo-Traders/Agrocylo-PIP
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.ts
More file actions
24 lines (17 loc) · 682 Bytes
/
Copy pathmain.ts
File metadata and controls
24 lines (17 loc) · 682 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { NestFactory } from '@nestjs/core';
import { ConfigService } from '@nestjs/config';
import { Logger } from 'nestjs-pino';
import { AppModule } from './app.module';
import { configureApp } from './setup-app';
async function bootstrap() {
const app = await NestFactory.create(AppModule, { bufferLogs: true });
// Route Nest's internal logging through Pino.
app.useLogger(app.get(Logger));
configureApp(app);
const config = app.get(ConfigService);
const port = config.get<number>('app.port') ?? 3000;
await app.listen(port);
const logger = app.get(Logger);
logger.log(`Agrocylo PIP backend listening on port ${port}`, 'Bootstrap');
}
void bootstrap();