A bit of background, on mac you can do something like this
PORT=3002 NODE_ENV=dev node server.js
But can you do the same on windows? I have tried
set PORT=3002 && echo %PORT%
but the variable does not update until the echo is called again.
The reason I need this is that i am currently using npm start to run a script on a mac that looks like the first line of code. This does not work in windows since you cannot set env variables like that.