require(’./controller’)(app);在indexController.js文件中访问app.locals对象,在app.js文件中,定义了 var app=express(),把app对象传给router.js模块。