New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

caching-proxy2

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

caching-proxy2

A Proxy server that caches responses in filesystem that really works

0.1.1
latest
Source
npm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

Caching Proxy

A Proxy server that caches responses in filesystem that really works

  • Need to test against a remote API and have a slow connections?
  • The service has no CORS enabled so you can query it from localhost?

Solution: Cache it in a local server

Install

npm install caching-proxy2

or globally:

npm install -g caching-proxy2

Usage

Imaging you are consuming an API like http://api.server.com/v2/sources/19/series?format=json and now want to cache all requests there locally or just enable CORS. Start caching-server, use the same urls, just change the server name;

npx caching-proxy2 --hostName "http://api.server.com" --port 9000

And now instead of consuming http://api.server.com/v2/sources/19/series?format=json, point your client to http://localhost:9000/v2/sources/19/series?format=json

and voila!

Keywords

proxy

FAQs

Package last updated on 23 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts