0.0.5 • Published 2 years ago

@gamas/dev-proxy v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Dev Proxy

Node.js build CI

Installation

$ npm install --save @gamas/dev-proxy

Basic example

import { Proxy } from "@gamas/dev-proxy";

const rules = [
    {
        label: "exemple",
        route: "/",
        target: "https://example.com",
        replaceHostHeader: true
    }
];

const proxy = Proxy
    .createProxy(8081)
    .useRules(rules)
    .build();

proxy.start();

Rule properties

NameRequiredTypeDescription
labelXstring
routeXRoute
targetXTarget
transformersTransformer[]
replaceHostHeaderboolean
prioritynumber
serverOptionsServerOptionsSee

ServerOptions

This code is based on node-http-proxy, a programmable proxying library.

ServerOptions

Build locally

$ npm install
$ npm run build
0.0.5

2 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago