From 0fec8b946741f03d689ad052ef93a31e89dfa326 Mon Sep 17 00:00:00 2001 From: Manik Maity Date: Wed, 13 Nov 2024 20:25:19 +0530 Subject: [PATCH] Added deployed backend url in frontend --- frontend/.env | 1 + frontend/src/helper/axiosInstance.js | 3 ++- frontend/src/pages/Home.jsx | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 frontend/.env diff --git a/frontend/.env b/frontend/.env new file mode 100644 index 0000000..d40a145 --- /dev/null +++ b/frontend/.env @@ -0,0 +1 @@ +VITE_BACKEND_URL="https://livepoll-anjx.onrender.com" \ No newline at end of file diff --git a/frontend/src/helper/axiosInstance.js b/frontend/src/helper/axiosInstance.js index ce7db93..9ae963d 100644 --- a/frontend/src/helper/axiosInstance.js +++ b/frontend/src/helper/axiosInstance.js @@ -1,7 +1,8 @@ import axios from "axios"; const axiosInstance = axios.create({ - baseURL: "http://localhost:3000/api/v1", + // baseURL: `http://localhost:3000/api/v1`, + baseURL: `https://livepoll-anjx.onrender.com/api/v1`, withCredentials: true, headers: { "Content-Type": "application/json", diff --git a/frontend/src/pages/Home.jsx b/frontend/src/pages/Home.jsx index 35fbbd9..9355bd6 100644 --- a/frontend/src/pages/Home.jsx +++ b/frontend/src/pages/Home.jsx @@ -6,7 +6,6 @@ function Home() { const navigator = useNavigate(); - return (

Welcome to LivePoll