var app = exports = module.exports = {};是什么鬼?
在看express的源码,有个问题不理解。
var app = exports = module.exports = {};
app.init = function init() {
this.cache = {};
this.engines = {};
this.settings = {};
this.defaultConfiguration();
};
console.log(module)
// Module { exports: { init: [Function: init] } }
init是怎么跑到module.exports里面的?