Skip to content

Commit

Permalink
update env
Browse files Browse the repository at this point in the history
  • Loading branch information
moonlags committed May 22, 2024
1 parent 50300ce commit 3ee6fb5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function App() {

useEffect(() => {
axios
.get("http://" + process.env.REACT_APP_BACKEND_HOST + "/api/v1/session", {
.get("http://" + import.meta.env.VITE_BACKEND_HOST + "/api/v1/session", {
withCredentials: true,
})
.then((response) => {
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/DevicesView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function DevicesView() {

useEffect(() => {
axios
.get("http://" + process.env.REACT_APP_BACKEND_HOST + "/api/v1/devices", {
.get("http://" + import.meta.env.VITE_BACKEND_HOST + "/api/v1/devices", {
withCredentials: true,
})
.then((response) => {
Expand All @@ -32,7 +32,7 @@ function DevicesView() {
const handle_link = () => {
axios
.get(
"http://" + process.env.REACT_APP_BACKEND_HOST + "/api/v1/link/" + imei,
"http://" + import.meta.env.VITE_BACKEND_HOST + "/api/v1/link/" + imei,
{
withCredentials: true,
}
Expand Down
2 changes: 1 addition & 1 deletion client/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import App from "./App.tsx";
import "./index.css";
import { Toaster } from "sonner";

if (process.env.REACT_APP_BACKEND_HOST === undefined) {
if (import.meta.env.VITE_BACKEND_HOST === undefined) {
throw new Error("Please set REACT_APP_BACKEND_HOST variable");
}

Expand Down

0 comments on commit 3ee6fb5

Please sign in to comment.