src/server/router.js
function createRouter(modules) {
  debug('Creating a new router. Modules: ' + JSON.stringify(modules, null, 3));

  var router = express();
  router.use(bodyParser.json());

  // Map the requested entity path with the actual serverside entity
  router.use('/isomorphine', methodLoader(modules));

  // Proxy request pipeline
  router.post('/isomorphine/*', getPayload, callEntityMethod, serve);

  return router;
}
function createRouter(modules) {
  debug('Creating a new router. Modules: ' + JSON.stringify(modules, null, 3));

  var router = express();
  router.use(bodyParser.json());

  // Map the requested entity path with the actual serverside entity
  router.use('/isomorphine', methodLoader(modules));

  // Proxy request pipeline
  router.post('/isomorphine/*', getPayload, callEntityMethod, serve);

  return router;
}
function createRouter ( modules ) { debug ( 'Creating a new router. Modules: ' + JSON . stringify ( modules , null , 3 ) ) ; var router = express ( ) ; router . use ( bodyParser . json ( ) ) ; // Map the requested entity path with the actual serverside entity router . use ( '/isomorphine' , methodLoader ( modules ) ) ; // Proxy request pipeline router . post ( '/isomorphine/*' , getPayload , callEntityMethod , serve ) ; return router ; }
Creates an express or connect-styled router,
and exposes the provided modules in the router's API surface area.

@param {Object}  modules  The entities to use.
@returns {Function}       An express app instance.

@providesModule router
Creates an express or connect - styled router and exposes the provided modules in the router s API surface area .