Change PORT on react project

Faisal Ahmed - Dec 11 '22 - - Dev Community

1st way:

  • create .env file
  • and write: PORT=3010

Image description

2nd way:

  • in the package.json file
  • change: "start": "react-scripts start",
  • and type : "start": "set PORT=3020 && react-scripts start",

Image description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .