mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-11 10:23:54 +00:00
refreact
server url calculated in constants
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
// TODO: should be defined dynamically?
|
||||
export const serverURL = 'http://localhost';
|
||||
export const NODE_PORT = 4001;
|
||||
|
||||
const calculateServer = () => {
|
||||
return window.location.origin.replace(window.location.port, `${NODE_PORT}/`);
|
||||
};
|
||||
|
||||
export const serverURL = calculateServer();
|
||||
|
||||
Reference in New Issue
Block a user