0.3.0 • Published 1 year ago

@nickhudkins/malcolm v0.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

šŸ‘“šŸ» Malcolm (in the Middle)

It's Man-In-The-Middle-Proxy for Development

Usage

Create a proxy.config.ts:

import { defineConfig } from "@nickhudkins/malcolm";

export default defineConfig({
  hosts: ["google.com"],
  handleRequest: async (req) => {
    const url = new URL(req.url);
    return {
      ctx: {
        requestURL: url,
      }
    }
  },
  handleResponse: (
    res: PassThroughResponse,
    ctx
  ) => {
    // I have `ctx`! which is provided by the above
    return;
  },
};

Run malcolm

Development

Working in this directory?Clone and npm run start:dev

ā¤ļø Made with Love by @nickhudkins

0.3.0

1 year ago

0.2.1

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.0.1

1 year ago