Skip to content

TalaikisInc/api_caching_proxy

Repository files navigation

API Redis Caching proxy

This simple proxy caches existing API calls on Redis, expiries are configurable for each route.

How it works

End user sends POST query with wanted action to the proxy, then proxy caches and forwards the request from the original API or from cached result (if it exists on Redis) to the user.

Example query:

{
    "action": "API_CACHE",
    "query": "beers/1"
}

Install

npm i

Run

All below parts require Redis running.

npm run start

Deploy

npm i -g pm2
./build.sh <folder> <port> [install]

Test

npm run test

Releases

No releases published

Packages

No packages published