Answer the question
In order to leave comments, you need to log in
Why is one port active for all sites on the server (nodejs)?
Hello!
I'm recently learning nodejs, everything works fine on the local server. Decided to transfer to VPS (OS - Debian 7). Used commands:
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo apt-get install -y build-essential
Answer the question
In order to leave comments, you need to log in
Because you need to bind to 127.0.0.1 and not to any.
https://nodejs.org/api/http.html#http_server_liste... - second argument should be "127.0.0.1"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question