Skip to content

Latest commit

 

History

History
18 lines (11 loc) · 1.16 KB

README.md

File metadata and controls

18 lines (11 loc) · 1.16 KB

API Proxy Server

API proxy server to hide the API key used to make a call to a third-party API using Node.js. Added rate limiting to avoid spamming and caching for improved performance

Generally, when we make a call to a public API (like the Open Weather API in this case), we can see the API key on the client side, like this:

image

By making an API proxy server, we hide the API key & store it on the client side. So our client side looks something like this:

image

Rate Limiting

Rate limiting is used to limit network traffic. It puts a cap on how often someone can repeat an action within a certain time period – in this example, trying to hit the weather API. Rate limiting can help stop certain kinds of malicious bot activity.

Caching

Caching refers to storing frequently accessed data in a cache to reduce the need for expensive computations or external API calls, resulting in faster response times and lower server loads.

Hosted on Vercel.