Unitech/pm2 — pull request #19 by rlidwka (2013-06-20 19:36:20+00:00)
Title: Explicitly set pm2 to bind to localhost

There is a security issue: axon 0.6.1 (latest one from npm registry) binds to 0.0.0.0 by default. I could be mistaken because they seem to have fixed this in github repo... But anyway, if I install pm2, it binds to 0.0.0.0 on my system which means anybody could connect to it.

I took a liberty to move this option to `constants.js` (changing `DAEMON_PORT: ` to `DAEMON_BIND_ADDR: ':'`). So, in case someone really needs to bind this app to 0.0.0.0, they'll just have to change that file instead of digging the source code.

If you don't like this idea very much, just change this line:
https://github.com/Unitech/pm2/blob/master/lib/Satan.js#L71

to this:
```javascript
rep.bind(cst.DAEMON_PORT, 'localhost');
```

And it'll be fine.