I am very new to this business and trying to make some kind of express application
var express = require('express'); var app = express(); app.listen(3000, function(err) { if(err){ console.log(err); } else { console.log("listen:3000"); } });
When I start the server with the command:
node server.js
everything goes well
I see on the console
listen:3000
and when i try
curl http:
I see "good."
When i try
telnet localhost
I see
Trying 127.0.0.1... Connected to localhost. Escape character is '^]'
but when i try
netstat -na | grep :3000
I see
tcp 0 0 0.0.0.0:3000 0.0.0.0:* LISTEN
The question is, why is it listening on all interfaces, not just localhost?
Linux mint 17 OS without any whistles.
source share