In my localhost, running below command
PORT=4080 node server.js
But, it was throwing an unexpected error.
\'PORT\' is no
In Windows you can set scripts in package.json:
package.json
"start": " set PORT=portnumber && react-app-rewired start"
or
"start": " set PORT=3001 && react-script start".
It worked for me: