npm.io
0.2.3 • Published 4 years ago

deject

Licence
MIT
Version
0.2.3
Deps
1
Size
5 kB
Vulns
0
Weekly
0

Dependency Injection

This is a simple package for dependency injection.

Usage

const config = require('./config')
const DI = require('deject')(config)
DI.register('port', port)
DI.register('name', name)
DI.get('server')

Configuration

This DI needs a configuration as config.js file

module.exports = {
    factory: {
        ...
    },
    register: {
        ...
    }
}

License

This project is licensed under the MIT license. See the LICENSE file for more info.

Keywords