https://github.com/mmahrous/deject
A simple dependency injector.
https://github.com/mmahrous/deject
Last synced: about 2 months ago
JSON representation
A simple dependency injector.
- Host: GitHub
- URL: https://github.com/mmahrous/deject
- Owner: mmahrous
- License: mit
- Created: 2020-07-22T10:31:24.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-06-16T12:54:57.000Z (11 months ago)
- Last Synced: 2025-03-11T03:08:28.362Z (2 months ago)
- Language: JavaScript
- Size: 43 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Dependency Injection
This is a simple package for dependency injection.### Usage
```JS
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
```JS
module.exports = {
factory: {
...
},
register: {
...
}
}
```
# License
This project is licensed under the MIT license. See the LICENSE file for more info.