From 903385e501ec0dd4c9f2a949f7ef57f60ee4d52c Mon Sep 17 00:00:00 2001 From: Abi Raja Date: Wed, 15 Nov 2023 11:33:41 -0500 Subject: [PATCH] add default backend URL as fallback if the user hasn't set up the env file --- frontend/src/generateCode.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/generateCode.ts b/frontend/src/generateCode.ts index 787249b..c8e4ec9 100644 --- a/frontend/src/generateCode.ts +++ b/frontend/src/generateCode.ts @@ -1,6 +1,7 @@ import toast from "react-hot-toast"; -const WS_BACKEND_URL = import.meta.env.VITE_WS_BACKEND_URL; +const WS_BACKEND_URL = + import.meta.env.VITE_WS_BACKEND_URL || "ws://127.0.0.1:7000"; const ERROR_MESSAGE = "Error generating code. Check the Developer Console for details. Feel free to open a Github ticket";