By thopatevijay
I have a node.js project running on the ubuntu server.—> App is listening on 5000.
So, I want to access it locally. Like http://server_ip:5000
How can I do this?
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!
Hi, I have no idea how to access node.js app locally using console and being satisfied of what you get, at the same time. It is your decision if your node.js is front-end or back-end environment. You can access it from outside when you configure it as front-end environment. That means, your app must listen on your droplet’s public IP. You can check what ip addresses your app listens on.
sudo netstat -tulpn
If you get one out of the lines below, your app can be reachable from the Internet.
Proto Local Address State
tcp 0 0.0.0.0:5000 LISTEN
tcp your_droplet_public_ip:5000 LISTEN
In addition, if you have any firewall installed, you need to configure it to allow connections on specific port (TCP 5000, in your case).
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.