1.0.0 • Published 3 years ago
@codayblue/dssc v1.0.0
Ded Simple Service Container
This container is meant to be really simple and really basic. To make it small and extreamly portable. This container could probably be used any place that javascript can be used. Though nodejs is the primary target to be used to generate backend services. It is also pretty much a love letter to closures as they are heavly used in this project.
Usage
You can get the package from npm with either npm install @codayblue/dssc
or yarn add @codayblue/dssc
Once you have the package you can use like so
const DSSC = require('@codayblue/dssc');
const container = new DSSC();
container.register('ServiceName', (options) => {
return new SampleService(options.msg);
}, {msg: 'Hello World!'});
const service = container.getService('ServiceName');
service.example();
1.0.0
3 years ago