I use SET NODE_ENV=PRODUCTION& nodemon server.js in my package.json file.
But the environment not change and still run in the development mode.
It also throw error like sh: 1: SET: not found in terminal.
Since you're using sh
and terminal
, I'm guessing you're on either Mac or Linux, as most production servers are UNIX based. The correct command would be just NODE_ENV=PRODUCTION