Exporting app.js for use as a module.
default baseUrl =>'/'.
All redirect, and routes use baseUrl.
Now, we can use great mongo-express in your express apps:
Example
1) change baseUrl to '/db/'

2)At your application, add following lines
var mongoExpress=require('mongo-express');
app.post('/db/*',mongoExpress);
app.get('/db/*',mongoExpress);

//with your Auth check
//var mongoExpress=require('mongo-express');
//app.post('/db/*',checkRights,mongoExpress);
//app.get('/db/*',checkRights,mongoExpress);