You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
660 B
22 lines
660 B
import IOC from "./_iocClass"
|
|
import { Container } from "inversify"
|
|
import iocModules, { destroyAllModules } from "./modules/_ioc"
|
|
import iocController, { destroyAllController } from "./controller/_ioc"
|
|
import iocCommand, { destroyAllCommand } from "./command/_ioc"
|
|
import App from "./App"
|
|
|
|
async function destroyAll() {
|
|
await destroyAllModules(_ioc)
|
|
await destroyAllController(_ioc)
|
|
await destroyAllCommand(_ioc)
|
|
}
|
|
|
|
const _ioc = new Container()
|
|
_ioc.load(iocModules)
|
|
_ioc.load(iocCommand)
|
|
_ioc.load(iocController)
|
|
_ioc.bind(IOC).toSelf().inSingletonScope()
|
|
_ioc.bind(App).toSelf().inSingletonScope()
|
|
|
|
export { IOC, destroyAll, _ioc }
|
|
export default IOC
|
|
|