Initial documentation of crate.
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
b991c30953
commit
65898987a6
24
README.md
24
README.md
|
@ -1,6 +1,7 @@
|
|||
# mirror-server
|
||||
|
||||
A simple server for mirroring HTTP requests for testing.
|
||||
A simple server for mirroring HTTP requests for testing. It is optimized for
|
||||
working with REST API JSON calls, and catching headers.
|
||||
|
||||
[![Build Status](https://ci.birch-tree.net/api/badges/dorian/mirror-server/status.svg)](https://ci.birch-tree.net/dorian/mirror-server)
|
||||
|
||||
|
@ -14,9 +15,14 @@ A simple server for mirroring HTTP requests for testing.
|
|||
* Install cargo-deb: `cargo install cargo-deb`
|
||||
* Create the DEB package: `cargo deb`
|
||||
* Faster builds using [cargo-watch](https://watchexec.github.io/#cargo-watch): `cargo watch -x run`
|
||||
* Installing the binary locally from source: `cargo install --path .`
|
||||
|
||||
## Install
|
||||
|
||||
`mirror-server` is installable either by a local Cargo install or a Debian
|
||||
package. Additionally `mirror-server` can be run as a Docker container using
|
||||
the latest (or tagged) release.
|
||||
|
||||
### Docker Image
|
||||
|
||||
Run via Docker using:
|
||||
|
@ -38,7 +44,17 @@ sudo dpkg -i "mirror-server-${VERSION}_amd64.deb"
|
|||
|
||||
Afterward you can run using `mirror-server`
|
||||
|
||||
## TODO
|
||||
## Usage
|
||||
|
||||
* [ ] Add documentation to the API.
|
||||
* [ ] Publish crate on <https://crates.io/>.
|
||||
```bash
|
||||
> mirror-server --help
|
||||
A simple server for mirror HTTP requests for testing.
|
||||
|
||||
Usage: mirror-server [OPTIONS]
|
||||
|
||||
Options:
|
||||
-p, --port <PORT> Port to run on [default: 8080]
|
||||
-i, --ips <IPS> Listen to IP mask [default: 0.0.0.0]
|
||||
-h, --help Print help
|
||||
-V, --version Print version
|
||||
```
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
#![warn(missing_docs)]
|
||||
|
||||
#![doc = include_str!("../README.md")]
|
||||
/// ## Usage
|
||||
///
|
||||
|
||||
use axum::{
|
||||
extract::{Host, Json, OriginalUri},
|
||||
http::{header::HeaderMap, Method},
|
||||
|
|
Loading…
Reference in New Issue