// клиент
var socket = new WebSocket("ws://localhost:8889/one?two=three");
// сервер
var WS = new require('ws');
var socket = new WS.Server({port: 8889});
socket.on('connection', function (client, data) {
console.log(data.url); // > one?two=three
client.on('message', function (message) {});
client.on('close', function () {});
});