devproxy

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 0 Imported by: 0

README

devproxy

Build Status GitHub

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
Tooling

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
devproxy command

Jump to

Keyboard shortcuts

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