This is a API Proxy Server
built with nodejs-express (typescript)
for
- Hide API Key (Proxy)
- Rate Limiting
- Caching
This example uses the OpenWeather API but the concept can be adopted for any project.
npm install
npm run dev
npm run watch-css
npm run build
npm run build-css
Rename .env.example to .env and edit the values
- API_BASE_URL =
https://api.openweathermap.org/data/2.5/weather
- API_KEY_NAME = "appid"
- API_KEY_VALUE = (Your API Key)
Go to the OpenWeather API site and modify the links as you need.
- Add new routes as your need
- Change rate limiting and caching to your desired values
And you are good to go.