An open API service indexing awesome lists of open source software.

https://github.com/kamil-kubiczek/caching-proxy

Simple caching proxy created in Node.js - CLI
https://github.com/kamil-kubiczek/caching-proxy

cache-proxy http nodejs proxy typescript

Last synced: 4 months ago
JSON representation

Simple caching proxy created in Node.js - CLI

Awesome Lists containing this project

README

        

## About project

This is a simple implementation of an HTTP proxy that supports in-memory caching, with additional support for writing cache data to a file asynchronously in the background. This helps restore cache when proxy is run again. Proxy is designed to handle only GET requests, other HTTP methods aren't cached. Feel free to fork or inspire.

**Project status: 🟢Ready to use**

**Warning: 🟡Code has not been tested production**

## Features

Features provided by CLI and described here - https://roadmap.sh/projects/caching-server

## Installation
Install npm dependencies
```
npm i
```

## How to run proxy in CLI

**Prerequisites:**

- must have `node 20.x.x` installed
- must have `[email protected] or higher` installed

**Steps to run**

1. Inside project root directory run
```
npm run build
```

2. Then run
```
node dist/index.js -o -p
```
Now you can start using proxy!

## Help

If you need help with command options use `node dist/index.js -h`