how to start react app on different port code example
Example 1: set port in react app
"start": "react-scripts start"
t0
"start": "PORT=3006 react-scripts start"
or
"start": "export PORT=3006 react-scripts start"
"start": "set PORT=3006 && react-scripts start"
Example 2: reactjs app change port
"start": "react-scripts start"
t0
"start": "PORT=3006 react-scripts start"
or
"start": "export PORT=3006 react-scripts start"
"start": "set PORT=3006 && react-scripts start"
Example 3: react set port
"start": "set PORT=3006 && react-scripts start"
Example 4: yarn start port
Create a .env file in your project folder
add the line "PORT=3006" inside the file and save