X
X
xlo2402020-04-11 22:26:27
VMware
xlo240, 2020-04-11 22:26:27

Why is the nodejs server page not loading?

Installed CentOS on the VMWare virtual machine. + Nodejs.
Launched a simple server.

var server = require('http').createServer(function(req, res){
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end("Привет мир");
});
server.listen(3000, '192.168.248.131');
console.log(server.listen(3000, '192.168.248.131')); 
console.log("5555555555");

Runs in terminal without error.
In theory, if you go to the browser at https://192.168.248.131:3000/ , the Hello World entry should be called.
But he doesn't let me.
On a local computer under Windows works.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question