use server.getConnections() to avoid deprecation warnings

`server.connections` is deprecated. This users `server.getConnections()` instead. I tested it and it works fine with node 10. I'm not sure which version of node added `.getConnections()` though, so I changed the engine requirement in the package.json to be node 10.