Skip to content

Commit 4eb76b9

Browse files
committed
Fixed import issue.
1 parent 023118c commit 4eb76b9

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

frontend/config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export const API_URL =
2+
(typeof import.meta !== "undefined" && import.meta.env?.VITE_API_URL) ||
3+
process.env.VITE_API_URL ||
4+
"http://localhost:4000";

frontend/src/App.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useEffect, useState } from "react";
22

3-
const API_URL = import.meta.env.VITE_API_URL || "http://localhost:4000";;
3+
import { API_URL } from "./config";
44

55
function App() {
66
const [tasks, setTasks] = useState([]);

0 commit comments

Comments
 (0)