Code Monkey home page Code Monkey logo

kiss-proxy's Introduction

kiss-proxy

Continuing the legacy of an easy-to-use proxy server that node-http-proxy started

It can be a real pain finding a dead-simple reverse proxy solution for node applications, what with nginx not being updated on some Linux distributions (and I don't even want to think about Windows), and node-http-proxy deciding that shipping a nice command-line utility like they used to was not a priority.

With that being said, I give you kiss-proxy, which has all the good mojo from the old original easy to use proxy, and is v0.10 compatible.

Install

npm install -g kiss-proxy

Using kiss-proxy from the command line

When you install this package with npm, a kiss-proxy binary will become available to you. Using this binary is easy with some simple options:

usage: kiss-proxy [options]

Starts a kiss-proxy server using the specified command-line options

options:
  --port   PORT       Port that the proxy server should run on
  --host   HOST       Host that the proxy server should run on
  --target HOST:PORT  Location of the server the proxy will target
  --silent            Silence the log output from the proxy server
  --user   USER       User to drop privileges to once server socket is bound
  
  --config OUTFILE    Location of the JSON configuration file for the proxy
                      server. All above options may be specified in the config
                      file but will be overridden by command-line arguments
  
  -h, --help          You're staring at it

Here's an example of what the config file format could look like if you want to do vhost routing:

{
  "router": {
    "my-node-site.com": "http://127.0.0.1:24623",
    "my-other-node-site.com": "http://127.0.0.1:13337",
    "regex-works-(also|as well).com": {
      "address": "http://127.0.0.1:13337",
      "regex": true
    }
  },
  "defaultRoute": "http://127.0.0.1:8020",
  "silent": true,
  "user": "cha0s"
}

Have fun, and happy devving! <3

kiss-proxy's People

Contributors

cha0s avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.