johnpapa / pluralsight-gulp

Starter Code for Pluralsight Course "JavaScript Build Automation with Gulp.js"
http://jpapa.me/gulpps
MIT License
158 stars 262 forks source link

NODE_ENV undefined #32

Open harksha opened 8 years ago

harksha commented 8 years ago

Running the server normally goes well without errors, but when doing the 'serve-dev' task NODE_ENV is always undefined, even if I explicitly set it to 'dev' `About to crank up node

PORT=7203

NODE_ENV=undefined

\ DEV **

Express server listening on port 7203

env = development

__dirname = C:\Projects\pluralsight-gulp\src\server

process.cwd = C:\Projects\pluralsight-gulp`

liran96 commented 8 years ago

if you're using Windows, run a search for "enviroment".go to Enviroment Variables and add the variable and its value(variable:NODE_ENV, value:build).then run node src/server/app.js from cli. it worked for me.