refract: cleanup server call constants

This commit is contained in:
cv
2021-05-16 22:41:43 +02:00
parent b42710a972
commit 8162c622a6
8 changed files with 46 additions and 60 deletions
+5
View File
@@ -1,7 +1,12 @@
export const NODE_PORT = 4001;
export const EVENT_TABLE = 'event';
export const EVENTS_TABLE = 'events';
const calculateServer = () => {
return window.location.origin.replace(window.location.port, `${NODE_PORT}/`);
};
export const serverURL = calculateServer();
export const eventURL = serverURL + EVENT_TABLE;
export const eventsURL = serverURL + EVENTS_TABLE;
export const playbackURL = serverURL + 'playback';