gimm/gulp-express — pull request #6 by erichosick (2014-10-13 02:06:39+00:00)
Title: Fixed passing of NODE_ENV setting to Express

The line:

service = child_process.spawn('node', [options.file], {
NODE_ENV: options.env
});

did not actually set NODE_ENV to options.env.

This does work:

process.env.NODE_ENV = options.env;
service = child_process.spawn('node', [options.file]);

Third parameter of child_process.spawn is not required because it defaults to process.env.