Skip to content

CLI tool that allows you to create a caching proxy server. The server forwards requests to a specified origin server, caches the responses, and returns cached responses for identical requests made subsequently. The project demonstrates how caching works and how to build a caching proxy server in Node.js.

Notifications You must be signed in to change notification settings

iArchitSharma/caching-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prerequisites-

Before you begin, ensure you have met the following requirements:

  • Node.js: Make sure you have Node.js installed. You can download it from Node.js official website.
  • npm: npm is typically installed with Node.js. You can verify the installation by running the following commands:
    node -v
    npm -v

Installation

  1. Clone the repository:

    git clone https://github.com/iArchitSharma/caching-proxy.git
    cd caching-proxy
  2. Install the node dependencies:

    npm install

Usage

Starting the Caching Proxy Server

To start the caching proxy server, run the following command:

node ./index.js start --port <number> --origin <url>
  • --port: The port on which the caching proxy server will run.
  • --origin: The URL of the origin server to which the requests will be forwarded.

Example:

node ./index.js start --port 3000 --origin http://dummyjson.com

In this example, the server will start on port 3000 and forward requests to http://dummyjson.com.

Clearing the Cache

You can clear the cache by running the following command:

node ./index.js clear-cache

CC

https://roadmap.sh/projects/caching-server

About

CLI tool that allows you to create a caching proxy server. The server forwards requests to a specified origin server, caches the responses, and returns cached responses for identical requests made subsequently. The project demonstrates how caching works and how to build a caching proxy server in Node.js.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published