changed address to dynamic
parent
24762bbdc1
commit
de42076c1f
10
src/utils.js
10
src/utils.js
|
@ -8,6 +8,8 @@ import { v4 as uuidv4 } from "uuid";
|
|||
/**
|
||||
* constants
|
||||
*/
|
||||
const wssProtocol = window.location.protocol === "https:" ? "wss://" : "ws://";
|
||||
|
||||
export const Constants = {
|
||||
COLORS: {
|
||||
PRIMARY: "#e67e22",
|
||||
|
@ -18,9 +20,11 @@ export const Constants = {
|
|||
//API_ADDRESS: "http://localhost:8080/v1",
|
||||
//STATIC_CONTENT_ADDRESS: "http://localhost:8080/",
|
||||
//WS_ADDRESS: "ws://localhost:8080/ws",
|
||||
API_ADDRESS: "http://" + window.location.hostname + "/api/v1",
|
||||
STATIC_CONTENT_ADDRESS: "http://" + window.location.hostname + "/api/",
|
||||
WS_ADDRESS: "ws://" + window.location.hostname + "/ws",
|
||||
API_ADDRESS:
|
||||
window.location.protocol + "//" + window.location.hostname + "/api/v1",
|
||||
STATIC_CONTENT_ADDRESS:
|
||||
window.location.protocol + "//" + window.location.hostname + "/api/",
|
||||
WS_ADDRESS: `${wssProtocol}${window.location.hostname}/ws`,
|
||||
ROUTE_PATHS: {
|
||||
GROUP_TASKS: "/group-tasks",
|
||||
GROUP_TASKS_VIEW: "/group-tasks/",
|
||||
|
|
Loading…
Reference in New Issue