Unable to use .env.production file when running npm run dev:prod
In the .env file I have the variable PORT=4000, in the .env.production file I have PORT=3000.
I configured in package.json as follows: “dev:prod”: “npx nodemon –env=production”,
when I have successfully run it on the production environment but still running on port 4000.
I tried every way to reinstall process.env but it didn’t work
Here is my code:
enter image description here