How to run on port 3000

I cloned my react app from git repository after installing nodejs and npm in the droplet. Once the cloning get finished I then executed the command “npm install”. After that tried to run the app using “npm start”. When opening the port 3000 as I use to do in my local machine. But while opening (ip_add:3000) the browser keeps loading and didn’t served the web page. How to make it run on port 3000, or tell me what sort of mistakes I had done. Provide me with suggestions. Thanks for the upcoming feedbacks.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @mayurkarmakar07,

It seems you haven’t opened port 3000 for external use. You’ll need to open it in order for you to be able to reach your application on the said port.

  • If you are using UFW, you can execute
sudo ufw allow 3000
  • If you are using only IPtables, you can execute
iptables -A INPUT -i eth0 -p tcp -m tcp --dport 3000 -j ACCEPT

Regards, KDSys