1.1.0 • Published 3 years ago
provider-manager v1.1.0
Provider Manager
A tool for managing node js module providers such as QueueProvider.
It is not completed yet. Many providers will be created as soon as possible, but with that, I will continue this project and add more features to it. On the other hand, I invite you to help me in this goal and send your suggestions to me, either through github or via email.
Table of Contents
Install
for installation, you can use this command:
$ npm install provider-manager
Usage
Just import this module to your application project in one of the following ways :
// if using webpack
import {ProviderManager, ProviderManagerOptions} from "provider-manager";
// if using pure nodejs
var {ProviderManager, ProviderManagerOptions} = require("provider-manager");
Then you should create an instance of ProviderManager
class :
var providerManager = new ProviderManager({
config: new ProviderManagerOptions(options)
})
the options
property that passed to the ProviderManagerOptions
class constructor is an object of configurations that shown below :
var options = {
// 'providers' is a list of providers that you want to load
// in your application project.
providers: {
provider_a: ProviderAClass,
provider_b: ProviderBClass,
...
},
ignoreErrors: true // no error is displayed when it is true
}
That's it :)
Maintainers
Contributing
Feel free to improve it! Open an issue or submit PRs.
License
ISC © Sajjad Anghooty