How to get Node.JS Express to listen only on localhost?
I have an application that I have behind a reverse proxy, I would like for it to only listen to localhost/127.0.0.1. I expected this to work: app.listen(3001, ‘localhost’); or app.listen(3001, ‘127.0.0.1’); …but instead I get an error: node.js:201 throw e; // process.nextTick error, or ‘error’ event on first tick ^ TypeError: Cannot read property ‘port’ … Read more