Guest User

Untitled

a guest
Oct 19th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. import { NestFactory } from '@nestjs/core';
  2. import { ContainerInterface, useContainer } from 'typeorm';
  3. import { AppModule } from './modules/app.module';
  4.  
  5. async function bootstrap() {
  6. const app = await NestFactory.create(AppModule);
  7.  
  8. // useContainer in typeorm is very similar but not exactly the same as in class-validator
  9. // The following code produces a ts error saying the interfaces don't match because the typeorm
  10. // version is more restrictive.
  11. useContainer(app.select(AppModule), { fallbackOnErrors: true });
  12.  
  13. await app.listen(3000);
  14. }
Add Comment
Please, Sign In to add comment