I created a website that uses a weather API from RapidAPI to fetch data and I've hidden the API key. How do I host it?

55 Views Asked by At

I looked up online on how to deploy a website for free, and I found out that we can use Github Pages, Vercel or Netlify.

I tried using Vercel and Github Pages, but both of them don't fetch data from the API for some reason. I'm not sure if it's a mistake from my end. Is there no way to host websites that use such realtime APIs for free?

Here is the folder structure, I've hidden the config.js that has the API key and host from Github: Folder structure

Here is the code that accesses the API: API Access code

Is there any way I could host this on Vercel or any such platform? What steps do I need to take to ensure the platform gets data from this API?

0

There are 0 best solutions below