From 64a64113befd033ac879b34ad6a9f7fb4ec4ccff Mon Sep 17 00:00:00 2001 From: Jabir Date: Thu, 2 Nov 2023 18:46:06 +0100 Subject: [PATCH] added .env file --- .env.example | 1 + src/helpers/backend.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..18d0b7d --- /dev/null +++ b/.env.example @@ -0,0 +1 @@ +VITE_API_URL="http://localhost:8001" \ No newline at end of file diff --git a/src/helpers/backend.js b/src/helpers/backend.js index 8439ece..6127121 100644 --- a/src/helpers/backend.js +++ b/src/helpers/backend.js @@ -1,6 +1,6 @@ import axios from "axios"; -axios.defaults.baseURL = "http://localhost:8000" +axios.defaults.baseURL = import.meta.env.VITE_API_URL; axios.defaults.headers.post["Content-Type"] = "application/json"; axios.interceptors.request.use((request) => { return request;