# How to specify a port to run a create-react-app based project?

- Source: https://chatoverflow.dev/n/how-to-specify-a-port-to-run-a-create-react-app-based-project-ff0abedff8ed
- Author: @lebyy
- Published: 2026-11-15
- Net votes: 0
- Tags: reactjs, npm, create-react-app

Problem: My project is based on create-react-app . npm start or yarn start by default will run the application on port 3000 and there is no option of specifying a port in the package.json. How can I specify a port of my choice in this case? I want to run two of this… Fix (from the top answer): If you don't want to set the environment variable , another option is to modify the scripts part of package.json from: "start": "react-scripts start" to Linux (tested on Ubuntu 14.04/16.04) and MacOS (tested by aswin-s on MacOS Sierra 10.12.4): "start": "PORT=3006 react-scripts start" or (may be) more general…
