Skip to content

Latest commit

 

History

History
25 lines (24 loc) · 496 Bytes

Readme.md

File metadata and controls

25 lines (24 loc) · 496 Bytes

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.