mirror of
https://github.com/tokio-rs/axum.git
synced 2024-11-28 19:22:56 +01:00
18 lines
428 B
Markdown
18 lines
428 B
Markdown
# auto-reload
|
|
|
|
This example shows how you can set up a development environment for your axum
|
|
service such that whenever the source code changes, the app is recompiled and
|
|
restarted. It uses `listenfd` to be able to migrate connections from an old
|
|
version of the app to a newly-compiled version.
|
|
|
|
## Setup
|
|
|
|
```sh
|
|
cargo install cargo-watch systemfd
|
|
```
|
|
|
|
## Running
|
|
|
|
```sh
|
|
systemfd --no-pid -s http::3000 -- cargo watch -x run
|
|
```
|