devproxy

devproxy is a tiny command line reverse proxy for local development
written in Go.
Installation
go get -u github.com/romnn/devproxy/cmd/devproxy
go install github.com/romnn/devproxy/cmd/devproxy
Example
Assume you have two services running:
When trying to access the API service from the frontend service directly,
you probably run into issues with CORS.
Using devproxy, you can start a reverse proxy that proxies
multiple services using rules of the format /path/prefix@http://service-url.
devproxy start --port 5000 /api@http://127.0.0.1:8090 /@http://127.0.0.1:8080
In this example, the reverse proxy will proxy both services on port 5000 such that all paths with prefix /api will be proxied to the API service
at http://127.0.0.1:8090 and path without a prefix (prefix /) will be
proxied to the frontend service at /@http://127.0.0.1:8080.
Development
Before you get started, make sure you have installed the following tools:
$ python3 -m pip install pre-commit bump2version
$ go install golang.org/x/tools/cmd/goimports
$ go install golang.org/x/lint/golint
$ go install github.com/fzipp/gocyclo
Please check that all checks pass:
pre-commit run --all-files