diff options
| author | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-09-29 13:33:21 +0200 |
|---|---|---|
| committer | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-09-29 13:33:21 +0200 |
| commit | 4d50d541cbd8b464b18a3f5306ca78c7474ad5da (patch) | |
| tree | b5277316360b2de68dae571fc13d85cd8ee6b0c3 /src | |
| parent | bcf119f2c4ac587cc8263db8a9fc0581521fdec7 (diff) | |
Make port dependent on window location
Diffstat (limited to 'src')
| -rw-r--r-- | src/api/socket.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/socket.js b/src/api/socket.js index b5bb9b37..549ed6a9 100644 --- a/src/api/socket.js +++ b/src/api/socket.js @@ -6,7 +6,7 @@ let requestIdCounter = 0; const callbacks = {}; export function setupSocketConnection(onConnect) { - socket = io.connect(window.location.protocol + "//" + window.location.hostname + ":8081"); + socket = io.connect(window.location.protocol + "//" + window.location.hostname + ":" + window.location.port); socket.on("connect", onConnect); socket.on("response", onSocketResponse); } |
