As I understand the WS module when mounted to an express app, then the url doesn't matter, but is simply passed along in the message, as websocket server is mounted on the same port as the express app.

I'm a bit unsure on how you pass the port along, which I why I just copy&pasted the url (with the ?url querystring), from commit (https://github.com/node-inspector/node-inspector/commit/ecc268efdcb2ea5717b9c22f14a026770ee0e947), when socket.io was added.

How about to be explicit about the protocol too? Generally I don't like magic string replacements, so I would prefer the latter option.

```javascript
var url = window.location.protocol.replace('http', 'ws') + '//' + window.location.host + resolveRelativePath('ws');
```

```javascript
var url = window.location.protocol === 'https' ? 'wss' : 'ws' + '://' + window.location.host + resolveRelativePath('ws');
```