SET NODE_ENV=development
cross-env NODE_ENV=production my-command
export NODE_ENV=development
//Before running your app, you can do this in console:
//OS X
export NODE_ENV=production
//Win
SET NODE_ENV=production
//PowerShell
$env:NODE_ENV="production"
//or you can run your app like this:
NODE_ENV=production node app.js
//You can also set it in your js file:
process.env.NODE_ENV = 'production';