IoC for Javascript & Node.js

IoC container for Javascript / Node.js provides a lightweight and flexible core to create a scalable API of a lib, a module, an application or a framework. is inspired (among others) by Angular and Pimple.
It is useful for starting a project quickly with a modular API ready to use. (and any object built on top of integrates:

No dependencies, works on Node.js and in the browser (only 7kb). is an Open Source project, free to use under MIT licence.


Quick example:

var api = noder.createNoder();
var db;

api.$di.set('config', {
  name: 'My great app',
  email: 'contact@domain.tld'

// shortcut of api.$di.factory()
api.$factory('db', '$container', function(ctn) {
  var dbService;

  // factory function body that constructs `db` service (database handler)

  // `$container` (ctn) is `api.$di._container`
  console.log(ctn === api.$di._container);

  // so:,

  return dbService;

// by getter
db = api.$di.get('db');

// by injection in another service constructor

function articleHandler(db, config) {
  // body of article handler ...

api.$factory('article', ['db', 'config'], articleHandler);

// by binding (shortcut of api.$di.apply())
var welcome = api.$apply(function() {

  // the scope (`this`) bind to `api.$di._container`
  return 'Welcome in ' + +
    'contact: ' +;