yxorp

command module
v0.0.0-...-9137b47 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2014 License: Unlicense Imports: 9 Imported by: 0

README

yxorp

A tiny reverse-proxy

See what I did there?

Install with go get github.com/gomicroprojects/yxorp

Example config JSON file:

{
    "www.example.com": {
        "TargetURL": "http://localhost:8080/example"
    },
    "www2.example.com": {
        "TargetURL": "http://localhost:8081/",
        "GZ": true
    }
}

The idea

Suppose you have now finished a couple of Go projects and you want to deploy them on a server. But you only have one IP address available and want to serve multiple projects under different domains on port 80.

yxorp to the rescue.

It:

  • provides a host-based reverse-proxy.
  • is configurable with a simple JSON file.
  • will act as a normal HTTP reverse proxy.
  • bonus: will optionally GZip encode the response.

The core functionality will be accomplished by using the httputil package. It provides a ReverseProxy. No need to reinvent the wheel.

Starting

Start with yxorp.go

www.gomicroprojects.com

Documentation

Overview

yxorp - a tiny reverse-proxy

Installation:

go get github.com/gomicroprojects/yxorp

This is the package doc. It can be placed in a doc.go file, which is a convention.

See http://blog.golang.org/godoc-documenting-go-code

Directories

Path Synopsis
Package gz provides an http.Handler, which will gzip-Encode the responses This is the first time we write a library package.
Package gz provides an http.Handler, which will gzip-Encode the responses This is the first time we write a library package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL