I have a Node.js application. My build script in my package.json looks like this:
"build": "webpack --config webpack.prod.js && set NODE_ENV=production&& npm run express-server"
When I run this script locally on my computer, I can access the process.env.NODE_ENV and it sure enough is in "production"
But when I do the same thing on my Ubuntu server hosted on digital ocean, then process.env.NODE_ENV is 'undefined'.
How can I set the NODE_ENV in a npm script on a Ubuntu server?