E
E
Elios2014-12-02 12:53:02
Node.js
Elios, 2014-12-02 12:53:02

How to run Node js on VPS?

Tell me how to run node.js server on VDS.
On the local everything is simple according to the instructions

var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(3030 );
console.log('Server running on port 3030.');

And then we open http://localhost/3030 and see the work
I do the same on the VPS, I get the answer in the console "Server running on port 3030" but nothing opens at this address

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Burov, 2014-12-02
@BuriK666

http://your.server.ip.address:3030;

I
Ilya Evseev, 2014-12-03
@IlyaEvseev

This was not the problem here, but for the future - many services listen only to the local interface by default.
Check in Linux - "netstat -nlp", in FreeBSD - "sockstat -4l".

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question