How to mount a sub-app in Express 3

in sub-app-dir/app.js

Express 2:

app.mounted(function (parent) {
  this.helpers({masterviews: parent._locals.settings.views + '/'});
});

Express 3:

app.mounted and app.helpers are no longer supported. As suggested in the migration guide, app.helpers could be replaced by app.locals but no documentation is provided for migrating app.mounted.

Not sure this is what you want to do, but I'd do it like this:

var express = require('express')
  , mysubapp = require('./lib/mysubapp/index'); // path is just for example
var app = express();

// then you mount the app
app.use(mysubapp);
// or if mysubapp returns a function
app.use(mysubapp());