0

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.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62

2 Answers2

1

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

Jeroen
  • 311
  • 2
  • 14
0

Set works only windows OS. If you used Unix like Operating systems you should just make NODE_ENV=production