Closed adammbh closed 3 years ago
Unhandled Runtime Error TypeError: Failed to fetch
i also get this
@gauravdh9 Any idea how can i fix this
actually we have source code for api but we can't disclose api url sorry for that
in that base url your api end point will come
if you want to check you can go through api repo clone it run it on some different port let say 5000
then it will work but it will show you an error for different origin
okay thank you ill try it out
to fix that you have to install ngrok to make origin of your request same
i use ngrok on the api right?
@gauravdh9 same error tho i changed the port to 8080
pls run the api repo now in the website repo create a .env.local file and add
BASE_URL="LOCALHOST:5000/api/"
okay thank you
@routayush1 another question the website takes a few minutes to load (like going to the website) how can i make it run faster?
pls run the api repo now in the website repo create a .env.local file and add
BASE_URL="LOCALHOST:5000/api/"
I am having the same issue, my API works and runs locally. But when I build the file and upload it to the website hoster it doesn't work.
I put everything and named a folder in the website .env.local and i put BASE_URL="url" or should i put like BASE_URL="url/api/home" or something because it dosent want to upload animes etc..