Transparent, aggressive api cache/proxy.
Transparent, aggressive API cache/proxy.
Pied piper is a tool to alleviate the pain of working with slow APIs. It can:
It uses no etags and tries to be as transparent as possible,
but it is a high level tool, meant to work with JSON requests/responses.
The name comes from the folk tale Rat-Catcher of Hamelin,
this tool has nothing to do with tv series or startups.
Instead of calling your http://foo.bar.dev:8080/api/
,
you have to change the api url in your frontend code to be something
like http://localhost:3100/myproject/proxy
(myproject can be
a name of your session, project or anything, this will be the collection
id in the database and it will group requests together).
See default values,
api interface
{
"env": {
"LOG_LEVEL": "silly",
"NODE_ENV": "development",
"TARGET": "http://dev.foo.bar.local/api",
"MONGODB_URI": "mongodb://localhost:27017/piedpiper",
"HTTPS_KEY": "local.key",
"HTTPS_CERT": "local.crt"
}
}
So far the server can run on https (supply both the cert and the key through env vars),
but https target endpoints are not supported. I will add support, if I need it.