Socket
Socket
Sign inDemoInstall

caching-proxy2

Package Overview
Dependencies
84
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    caching-proxy2

A Proxy server that caches responses in filesystem that really works


Version published
Weekly downloads
3
Maintainers
1
Install size
2.60 MB
Created
Weekly downloads
 

Readme

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

FAQs

Last updated on 23 Feb 2019

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc