dev-router

command module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2019 License: MIT Imports: 12 Imported by: 0

README

dev-router

A router for debugging and developing web apps.

Start a HTTP server and it will modify the requests your send, and the responses you get, according to the rule you specified.

Use cases:

  • You only want to replace some static JS and CSS files with local files for an existing website.
  • You want to direct one set of requests to site A, and another set of requests to site B.
  • And many more ...

Why?

  • Yes, similar (or all) functions can be achieved using other tools (e.g. Charles, Postman, etc.).
  • But the flexibility is best with custom code in a proper programming language like this dev-router.
  • Free. Plus, what could beat a great learning opportunity by hand-crafting your own router?

Build, config and run

For example:

go install
dev-router -conf=example/config.json

Then visit http://localhost:8081 to see the effect.

Custom rules

You can build on top of the example config.json.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package config represents the user provided config file structure.
Package config represents the user provided config file structure.
Package configure translates configs into rules and settings for the router server.
Package configure translates configs into rules and settings for the router server.

Jump to

Keyboard shortcuts

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