DEV Community

Gilbert Ngeno
Gilbert Ngeno

Posted on

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

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…

Top comments (1)

Collapse
 
pcelac profile image
Aleks

Add PORT=8000 in your .env file