Node Dependency Injection Express Middleware
A Node Dependency Injection middleware for Express
Installation
npm install --save node-dependency-injection-express-middleware
Usage
Minimal configuration
const app = const options = serviceFilePath: 'some/path/to/config.yml'app
Options
Name | Required | Type Value | Default Value |
---|---|---|---|
serviceFilePath | true | string | |
compile | false | boolean | false |
compilerPass | false | array | [] |
logger | false | class or object | null |
containerReferenceAsService | false | boolean | false |
defaultDir | false | string | null |
How to use all options
const app = const options = serviceFilePath: 'some/path/to/config.yml' compile: true compilerPass: logger: containerReferenceAsService: true defaultDir: '/some/cool/dir'app
How to get the container
app
Please, read the FULL DOCUMENTATION