TypeDI
Search…
Usage with TypeORM
To use TypeDI with routing-controllers and/or TypeORM, it's required to configure them to use the top-level TypeDI container used by your application.
1
import { useContainer as rcUseContainer } from 'routing-controllers';
2
import { useContainer as typeOrmUseContainer } from 'typeorm';
3
import { Container } from 'typedi';
4
5
rcUseContainer(Container);
6
typeOrmUseContainer(Container);
Copied!
Last modified 9d ago
Copy link