diff --git a/lib/cmd/dev.js b/lib/cmd/dev.js index 1292475a..a187ee26 100644 --- a/lib/cmd/dev.js +++ b/lib/cmd/dev.js @@ -42,9 +42,13 @@ class DevCommand extends Command { * run(context) { const devArgs = yield this.formatArgs(context); + const env = { + NODE_ENV: 'development', + EGG_MASTER_CLOSE_TIMEOUT: 1000, + }; const options = { execArgv: context.execArgv, - env: Object.assign({ NODE_ENV: 'development' }, context.env), + env: Object.assign(env, context.env), }; debug('%s %j %j, %j', this.serverBin, devArgs, options.execArgv, options.env.NODE_ENV); yield this.helper.forkNode(this.serverBin, devArgs, options);