fix: make options more compatibility
This commit is contained in:
parent
1015cea41d
commit
287e589ac7
1 changed files with 4 additions and 3 deletions
|
@ -44,13 +44,14 @@ module.exports = class Application extends Emitter {
|
|||
*
|
||||
*/
|
||||
|
||||
constructor(options = {}) {
|
||||
constructor(options) {
|
||||
super();
|
||||
options = options || {};
|
||||
this.proxy = options.proxy || false;
|
||||
this.middleware = [];
|
||||
this.subdomainOffset = options.subdomainOffset || 2;
|
||||
this.env = options.env || process.env.NODE_ENV || 'development';
|
||||
this.keys = options.keys || undefined;
|
||||
if (options.keys) this.keys = options.keys;
|
||||
this.middleware = [];
|
||||
this.context = Object.create(context);
|
||||
this.request = Object.create(request);
|
||||
this.response = Object.create(response);
|
||||
|
|
Loading…
Reference in a new issue