centralize config in config.ts

This commit is contained in:
Abi Raja 2023-11-20 11:50:06 -05:00
parent bf23d3198a
commit 103d1ce12c
2 changed files with 4 additions and 2 deletions

View File

@ -2,5 +2,8 @@
export const IS_RUNNING_ON_CLOUD =
import.meta.env.VITE_IS_DEPLOYED === "true" || false;
export const WS_BACKEND_URL =
import.meta.env.VITE_WS_BACKEND_URL || "ws://127.0.0.1:7001";
export const HTTP_BACKEND_URL =
import.meta.env.VITE_HTTP_BACKEND_URL || "http://127.0.0.1:7001";

View File

@ -1,7 +1,6 @@
import toast from "react-hot-toast";
import { WS_BACKEND_URL } from "./config";
const WS_BACKEND_URL =
import.meta.env.VITE_WS_BACKEND_URL || "ws://127.0.0.1:7001";
const ERROR_MESSAGE =
"Error generating code. Check the Developer Console for details. Feel free to open a Github issue";