From 70026cebc0fd20b660cafe0bf95d0eea73459de2 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Tue, 27 Oct 2020 20:30:09 +0100 Subject: Propagate user-specified API url to React build This change fixes an issue where we did not forward the environmental variable for controlling the API url to the React build. --- frontend/src/api/socket.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'frontend/src/api/socket.js') diff --git a/frontend/src/api/socket.js b/frontend/src/api/socket.js index 96034021..6974d5eb 100644 --- a/frontend/src/api/socket.js +++ b/frontend/src/api/socket.js @@ -6,7 +6,7 @@ let requestIdCounter = 0 const callbacks = {} export function setupSocketConnection(onConnect) { - const apiUrl = process.env.REACT_APP_API_URL || window.location.hostname + ':' + window.location.port + const apiUrl = process.env.REACT_APP_API_BASE_URL || window.location.hostname + ':' + window.location.port socket = io.connect(window.location.protocol + '//' + apiUrl) socket.on('connect', onConnect) -- cgit v1.2.3