di.middleware
v1.1.1
Published
DI middleware for ingress
Downloads
10
Readme
di.middleware
Dependency Injection middleware for ingress
npm install di.middleware
Example
import ingress from 'ingress'
import MyContext from './context'
import { DiContainer } from 'di.middleware'
import { providers, perRequestProviders } from './providers'
const app = ingress(),
di = new DiContainer(MyContext, providers, perRequestProviders)
app.use(di.middleware)
...
This module will likely be combined with Ingress or router.middleware