From 3854a0cd2766c1e190b82edfb19445bd525963dd Mon Sep 17 00:00:00 2001 From: Wilco Kruijer Date: Wed, 19 Feb 2020 17:05:56 +0100 Subject: [PATCH] Dynamic port --- frontend/src/App.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 08a8006..05a70b1 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -4,8 +4,15 @@ import {SocketIOProvider} from "use-socketio/lib"; import Wrapper from "./Wrapper"; const App = () => { + let host; + if (window.location.hostname === "centurion.svia.nl") { + host = "https://centurion.svia.nl"; + } else { + host = window.location.protocol + "//" + window.location.hostname + ":3001"; + } + return ( - + );