Skip to content

Commit

Permalink
feat: set EGG_MASTER_CLOSE_TIMEOUT when run dev (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
popomore authored and atian25 committed Mar 27, 2018
1 parent fd1052b commit c48860c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/cmd/dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c48860c

Please sign in to comment.