2023-01-12 09:20:03 -05:00
|
|
|
# mirror-server
|
|
|
|
|
2023-01-12 09:41:47 -05:00
|
|
|
A simple server for mirroring HTTP requests for testing.
|
|
|
|
|
|
|
|
## Getting Started
|
|
|
|
|
|
|
|
* Use the latest stable version of Rust using rustup.
|
|
|
|
* Build: `cargo build`
|
|
|
|
* Test: `cargo test`
|
|
|
|
* Run the server: `cargo run -- --port=8080`
|
|
|
|
* Create a DEB package:
|
|
|
|
* Install cargo-deb: `cargo install cargo-deb`
|
|
|
|
* Create the DEB package: `cargo deb`
|
2024-02-07 10:12:40 -05:00
|
|
|
* Faster builds using [cargo-watch](https://watchexec.github.io/#cargo-watch): `cargo watch -x run`
|
2023-01-12 09:41:47 -05:00
|
|
|
|
2023-01-13 09:56:06 -05:00
|
|
|
## Install
|
|
|
|
|
|
|
|
Download the DEB file, and install it:
|
|
|
|
|
|
|
|
```bash
|
2024-02-07 15:01:15 -05:00
|
|
|
VERSION=0.3.0
|
2023-04-14 09:58:36 -04:00
|
|
|
REPO_URL=https://code.birch-tree.net/api/packages/dorian/generic/mirror-server/
|
|
|
|
curl "${REPO_URL}/${VERSION}/mirror-server_${VERSION}_amd64.deb"
|
|
|
|
sudo dpkg -i "mirror-server-${VERSION}_amd64.deb"
|
2023-01-13 09:56:06 -05:00
|
|
|
```
|
2023-04-14 09:58:36 -04:00
|
|
|
|
|
|
|
## TODO
|
|
|
|
|
2024-02-07 10:12:40 -05:00
|
|
|
* [x] Migrate actix to axum for easier maintainability.
|
|
|
|
* [x] Add mirroring of JSON request.
|
2024-02-07 15:01:15 -05:00
|
|
|
* [x] Add logging to server.
|
2024-02-08 14:57:57 -05:00
|
|
|
* [x] ~~Add convenience path to access logging for a certain date / records.~~
|
2024-02-21 21:44:18 -05:00
|
|
|
* [ ] Create Docker image for mirror-server for easier distribution.
|
|
|
|
* [ ] Add publishing of DEB and Docker image to DroneCI.
|
|
|
|
* [ ] Add OpenAPI/Swagger UI
|