Update AppRouter.jsx
This commit is contained in:
parent
457a45cabb
commit
0855f01913
1 changed files with 1 additions and 1 deletions
|
|
@ -63,7 +63,7 @@ const AppRouter = () => {
|
||||||
|
|
||||||
const fetchAPI = async () => {
|
const fetchAPI = async () => {
|
||||||
const location = window.location;
|
const location = window.location;
|
||||||
const uri = `http://localhost:5172/api`;
|
const uri = `${location?.protocol}//${location?.hostname}:5172/api`;
|
||||||
const response = await axios.get(uri);
|
const response = await axios.get(uri);
|
||||||
console.log(response.data.fruits);
|
console.log(response.data.fruits);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue