chore(example): Autoreloading server example (#316)

* Create an example of an autoreloading server

* Document the autoreloading server example

* Format autoreloading server example

* Add note about cargo-watch in the examples readme
This commit is contained in:
thisKai
2020-04-09 17:55:53 -04:00
committed by GitHub
parent d2ad8df629
commit f6ecaff0de
3 changed files with 65 additions and 0 deletions
+11
View File
@@ -80,6 +80,13 @@ $ cargo run --bin tls-server
$ cargo run --bin health-server
```
## Autoreloading Server
### Server
```bash
systemfd --no-pid -s http::[::1]:50051 -- cargo watch -x 'run --bin autoreload-server'
```
### Notes:
If you are using the `codegen` feature, then the following dependencies are
@@ -89,3 +96,7 @@ If you are using the `codegen` feature, then the following dependencies are
* [prost](https://crates.io/crates/prost)
* [prost-derive](https://crates.io/crates/prost-derive)
The autoload example requires the following crates installed globally:
* [systemfd](https://crates.io/crates/systemfd)
* [cargo-watch](https://crates.io/crates/cargo-watch)