MCPcopy
hub / github.com/nestjs/nest / bootstrap

Function bootstrap

sample/36-hmr-esm/src/main.ts:7–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5declare const module: any;
6
7async function bootstrap() {
8 const app = await NestFactory.create(AppModule);
9 app.useGlobalPipes(new ValidationPipe());
10
11 await app.listen(process.env.PORT ?? 3000);
12 console.log(`Application is running on: ${await app.getUrl()}`);
13
14 if (module.hot) {
15 module.hot.accept();
16 module.hot.dispose(() => app.close());
17 }
18}
19bootstrap();

Callers 1

main.tsFile · 0.70

Calls 7

createMethod · 0.65
useGlobalPipesMethod · 0.65
listenMethod · 0.65
logMethod · 0.65
getUrlMethod · 0.65
closeMethod · 0.65
disposeMethod · 0.45

Tested by

no test coverage detected