By Tushar Kale
IP for domain is assigned as 165.227.81.80
Created hello.js file as follows:
var http = require(‘http’); http.createServer(function (req, res) { res.writeHead(200, {‘Content-Type’: ‘text/plain’}); res.end(‘Hello World\n’); }).listen(8080, ‘localhost’); console.log(‘Server running at http://localhost:8080/’);
and started with command “node hello.js”
server starts at 8080
Entering URL: http://165.227.81.80:8000 gets error:
Site cannot be reached 165.227.81.80 refused to connect.
How should I fix this? Help please!
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!
Have you tried http://165.227.81.80:8080 while the server is running? You appear to have mistyped it above.
Make sure that your node application is binding to 8080 and that you either don’t have a firewall running that is restricting the port or that you have made the appropriate exemption in the firewall for your external IP.
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.