A bridge between the M and C bits of MVC
A model loader that a controller calls. Basically, just the M and C bits of MVC.
An interface for controllers to specify that certain models will be needed, and then have them get loaded.
var MC = require'emcee'// add a bunch of modelsMCmodel'login'// callback is called with (er, data)reqsessionget'login' cbMCmodel'train'// later on...httpcreateServer// check if the user is logged in.var m =// modelname, args...mload'login' reqmload'bike' requrl res// different kind of bike: modelname, alias, args...mloadAs'bike' 'motorbike' 'dirt' 'roads'mend// either there is an error, or all models are loaded on the// 'models' object. note that all errors are assumed to be// catastrophic, so you only get the first error, and the// models object will only contain the models that got loaded// before the error occurred.listen1337