diff --git a/client/.env b/client/.env new file mode 100644 index 0000000..c404ee2 --- /dev/null +++ b/client/.env @@ -0,0 +1,2 @@ +VITE_TEST_VAR=123 +VITE_SERVER_API=http://192.168.56.1:3000 \ No newline at end of file diff --git a/client/src/api/urls.ts b/client/src/api/urls.ts index 82e0886..7213b07 100644 --- a/client/src/api/urls.ts +++ b/client/src/api/urls.ts @@ -1,4 +1,5 @@ -const serverApi = "http://192.168.56.1:3000"; +// const serverApi = "http://192.168.56.1:3000"; +const serverApi = import.meta.env.VITE_SERVER_API; const apartmentsApi = `${serverApi}/apartments`; diff --git a/client/src/components/searchPage/LayoutOptions.tsx b/client/src/components/searchPage/LayoutOptions.tsx index e0421b9..13a389e 100644 --- a/client/src/components/searchPage/LayoutOptions.tsx +++ b/client/src/components/searchPage/LayoutOptions.tsx @@ -22,6 +22,7 @@ import SearchLoader from "./SearchLoader"; const LayoutOptions = () => { const { apartments, setApartments } = useApartments(); const [isLoading, setIsLoading] = useState(false); + console.log("first", import.meta.env.VITE_TEST_VAR); const { setModal } = useModal(); const { diff --git a/server/.env b/server/.env index 0631fdd..3f3f579 100644 --- a/server/.env +++ b/server/.env @@ -1,3 +1,2 @@ PORT=3000 -REFRESH_TOKEN=1000.da3146d49fa8a399f0c635e74954ff9c.e010dbb1bb605d7e1aa5bf7fc0521f8b -URL= \ No newline at end of file +REFRESH_TOKEN=1000.da3146d49fa8a399f0c635e74954ff9c.e010dbb1bb605d7e1aa5bf7fc0521f8b \ No newline at end of file diff --git a/server/src/routes/zohoAccessToken.ts b/server/src/routes/zohoAccessToken.ts index 84413f8..eba9835 100644 --- a/server/src/routes/zohoAccessToken.ts +++ b/server/src/routes/zohoAccessToken.ts @@ -1,5 +1,5 @@ import { Request, Response, NextFunction } from "express"; -import { aparmentsApi, updateAccessTokenApi } from "../consts.js"; +import { updateAccessTokenApi } from "../consts.js"; import { logger } from "../utils/logger.js"; var updateAccessToken = async function (req: Request, res: Response) {