diff --git a/agents/rust/mediator/README.md b/agents/rust/mediator/README.md index f848b43d12..d8c2966550 100644 --- a/agents/rust/mediator/README.md +++ b/agents/rust/mediator/README.md @@ -7,10 +7,8 @@ A mediator service for Aries Agents. ## Build This project depends on `aries-vcx` and is tightly integrated to work with it. -As such we expect this `mediator` module to be in a subdirectory of aries-vcx repo. -You may transplant it, but expect to change the `Cargo.toml` and adjust the dependencies on aries modules manually. -When ready it's simple to build. +When ready, it's simple to build. ```bash # Dev environment build @@ -26,13 +24,21 @@ cargo run --bin mediator ``` ```bash -# For testing / demo purposes +# For manual testing / demo purposes cargo run --package client-tui # To also see panic and debug info produced by tui cargo run --package client-tui 2> err || cat err ``` +```bash +# To run automated tests, you should have a mediator already running +# # Terminal 1 +cargo run --bin mediator +# # Terminal 2 +cargo test +``` + ### Configurable Options Currently the mediator reads the following environment variables. @@ -45,10 +51,20 @@ Currently the mediator reads the following environment variables. `MYSQL_URL`: - **Description**: MySQL url for the MYSQL database used for mediator persistence. -- **Default**: - +- **Default**: - (This is required!) - **Usage**: `MYSQL_URL=mysql://admin:password1235@localhost:3306/mediator-persistence.db` ``` +### Configurable Features + +Mediator's Agent contains some client code, which is used for testing, and dependent crates. +In production, you may want to remove this. To do so, pass `--no-default-features` to cargo when building. +This will ensure you are not pulling in the client code. + +```bash +cargo build --package mediator --no-default-features --release +``` + ## API Currently exposed endpoints.