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.

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.

×
1 answer

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

Submit an Answer