dotcloud/hipache — pull request #100 by ruudud (2014-04-02 18:42:46+00:00)
Title: Merge IPv4 and IPv6 createServer setup

Bind to all interfaces on both IPv4 and IPv6.
Before this commit, the default behaviour was to bind to all IPv4 interfaces,
but only the local `::1` interface on IPv6.

This pull request is the result of trying to bind to all interfaces on both IPv4 and IPv6.
I tried using the following config:

```
{
server: {
port: 80,
address: ["0.0.0.0"],
address6: ["::"]
}
}
```

…but it gave me errors:

```
events.js:72
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE
at errnoException (net.js:904:11)
at Server._listen2 (net.js:1042:14)
at net.js:1089:14
at Object. (cluster.js:592:5)
at handleResponse (cluster.js:171:41)
at respond (cluster.js:192:5)
at handleMessage (cluster.js:202:5)
at process.EventEmitter.emit (events.js:117:20)
at handleMessage (child_process.js:318:10)
at child_process.js:392:7
2 Apr 16:19:48 - Worker died (pid: 5902, suicide: false, exitcode: 8). Spawning a new one.
```