怪我咯2017-04-17 15:30:39
Thanks for the invitation production
Do not leave spaces
"start": "set NODE_ENV=production&& npm run build && node babel/server",
Just look at the output
console.log(`+${env}+`, env === "production");
迷茫2017-04-17 15:30:39
declare -x NODE_ENV=production && node temp.js
Passed the test myself
If it does not pass, use typeof env
to print out the type and have a look. It may be object
怪我咯2017-04-17 15:30:39
Change the set in the command to export
export NODE_ENV=production
You used the set command to bring spaces into environment variables