Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { NestFactory } from '@nestjs/core';
- import { ContainerInterface, useContainer } from 'typeorm';
- import { AppModule } from './modules/app.module';
- async function bootstrap() {
- const app = await NestFactory.create(AppModule);
- // useContainer in typeorm is very similar but not exactly the same as in class-validator
- // The following code produces a ts error saying the interfaces don't match because the typeorm
- // version is more restrictive.
- useContainer(app.select(AppModule), { fallbackOnErrors: true });
- await app.listen(3000);
- }
Add Comment
Please, Sign In to add comment