main.hmr.ts 384 B

12345678910111213141516
  1. import { NestFactory } from '@nestjs/core';
  2. import { AppModule } from './app.module';
  3. declare const module: any;
  4. async function bootstrap() {
  5. const app = await NestFactory.create(AppModule);
  6. await app.listen(3000);
  7. if (module.hot) {
  8. module.hot.accept();
  9. module.hot.dispose(() => app.close());
  10. }
  11. }
  12. // tslint:disable:no-floating-promises
  13. bootstrap();