Unrecognized PORT command
- Install this additional package cross-env in your node environment. The above command you mentioned is Unix (Ubuntu, Mac, etc…). In the windows environment, you need a different syntax and cross-env does your job.
- You can also create an .env file with
PORT=3006
and save it in your project directory.
Apart from cross-env, Below command can serve the purpose.
SET PORT=4080 && node server.js
PS: Set environment variable for nodeJs, run command in project folder.