scatter-plugin-config

Allows the Scatter IoC container to inject configuration parameters

Synopsis

Allows the Scatter IoC container to inject configuration parameters. Internally it loads the config module (by default) and invokes a get using the given config parameter.

var Scatter = require('scatter'),
  ScatterPluginConfig = require('scatter-plugin-config');
 
 
var scatter = new Scatter({
  plugins: [new ScatterPluginConfig()]
});
 
 
module.export = function(username) {
  return {
    connectfunction() {
      //do something with username 
    }
  };
};
 
module.export.__module = {
  //inject a config parameter as dependency 
  args: ["config!db.username"]
};
 

Stability

The API is in the process of settling, but has not yet had sufficient real-world testing to be considered stable.