luffy
Version:
rich webapp framework
22 lines (19 loc) • 480 B
JavaScript
/**
* Created by @玩家 on 14/11/9.
* mailTo huijun.wenghj@alibaba-inc.com
*/
/**
* Initialize a new `Application`.
*
* @api public
*/
function Application() {
if (!(this instanceof Application)) return new Application;
this.env = process.env.NODE_ENV || 'development';
this.subdomainOffset = 2;
this.poweredBy = true;
this.middleware = [];
this.context = Object.create(context);
this.request = Object.create(request);
this.response = Object.create(response);
}