Skip to content

alexgamas/dev-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Name Required Type Description
label X string
route X Route
target X Target
transformers Transformer[]
replaceHostHeader boolean
priority number
serverOptions ServerOptions See

ServerOptions

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

ServerOptions

Build locally

$ npm install
$ npm run build

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published