summaryrefslogtreecommitdiff
path: root/opendc-web/opendc-web-ui/src/api/socket.js
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2021-05-09 14:14:45 +0200
committerGitHub <noreply@github.com>2021-05-09 14:14:45 +0200
commit4f1c48bf32ded0ce1277b6483bdac7ec489f055f (patch)
tree1a2c7c09fb87731086ddcdb6570f710ad5cd56b2 /opendc-web/opendc-web-ui/src/api/socket.js
parentfb84d53278fa59a7c7a95538747563a0aed692a2 (diff)
parentf79c0872ddfcbe02a7bcc498b4a9d5d202caccd2 (diff)
ui: Update OpenDC homepage
This pull request contains various updates to the opendc.org homepage, in order to reflect the updates from OpenDC 2.0.
Diffstat (limited to 'opendc-web/opendc-web-ui/src/api/socket.js')
-rw-r--r--opendc-web/opendc-web-ui/src/api/socket.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/opendc-web/opendc-web-ui/src/api/socket.js b/opendc-web/opendc-web-ui/src/api/socket.js
index 884c4152..87facda8 100644
--- a/opendc-web/opendc-web-ui/src/api/socket.js
+++ b/opendc-web/opendc-web-ui/src/api/socket.js
@@ -1,5 +1,6 @@
import io from 'socket.io-client'
import { getAuthToken } from '../auth/index'
+import config from '../config'
let socket
let requestIdCounter = 0
@@ -7,8 +8,7 @@ const callbacks = {}
export function setupSocketConnection(onConnect) {
const apiUrl =
- window.$$env['API_BASE_URL'] ||
- `${window.location.protocol}//${window.location.hostname}:${window.location.port}`
+ config['API_BASE_URL'] || `${window.location.protocol}//${window.location.hostname}:${window.location.port}`
socket = io.connect(apiUrl)
socket.on('connect', onConnect)