diff --git a/frontend/app/src/App.js b/frontend/app/src/App.js index 45f7602..1cade45 100644 --- a/frontend/app/src/App.js +++ b/frontend/app/src/App.js @@ -3,11 +3,13 @@ import {useEffect, useState} from "react"; import axios from "axios"; import PostList from "./components/Post/PostList"; +const apiUrl = "http://localhost:8000"; + function App() { const [postList, setPostsList] = useState([]); const fetchPosts = async () => { - await axios.get("http://localhost:8000/catalog") + await axios.get(apiUrl + "/catalog") .then((response) => { setPostsList(response.data)}) } @@ -38,4 +40,4 @@ function App() { ); } -export default App; \ No newline at end of file +export default App;