Report this

What is the reason for this report?

ERR_CONNECTION_TIMED_OUT in node.js Using Centos 7

Posted on October 6, 2017

node version

v8.6.0

App.js

var express = require(‘express’);

var app = express();

app.get(‘/’ , function(req,res){ res.send(‘Works’); });

var logger = function(req,res,next) { console.log(‘Logging…’); next(); }

app.use(logger);

app.listen(3000 , function() { console.log(‘hello’);

});

when i try to access it in the browser i get ERR_CONNECTION_TIMED_OUT and I tried it in localhost it worked



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!

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.
0

Accepted Answer

Check firewall ports, may need to be opened.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.