F
F
fanhypermax2018-05-01 08:23:56
JavaScript
fanhypermax, 2018-05-01 08:23:56

Why is the server not visible on the Internet?

There is a windows server 2012 node on it
There is such a code

var express = require("express");
var app = express();
app.get("/", function(request, response){
    response.send("<h2>Привет Express!</h2>");
});
app.listen(3000);

On the server I turn in the browser http://125.234.41.751:3000/ normally shows.
I'm trying to connect from my computer and it doesn't show anything.
How to make it visible on the Internet by ip?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
rustelecom, 2018-05-01
@fanhypermax

In the firewall, in all likelihood, open access to port 3000.

A
Alexander, 2018-05-01
@Minifets

Try to add hostname, by default only localhost is listened to.

//app.listen(3000);
app.listen(3000, '0.0.0.0');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question