axum/examples/auto-reload
2024-03-26 10:22:59 +01:00
..
src Fix typo in auto-reload example. (#2680) 2024-03-26 10:22:59 +01:00
Cargo.toml Add auto-reload example (#2166) 2023-09-11 13:56:47 +02:00
README.md Add auto-reload example (#2166) 2023-09-11 13:56:47 +02:00

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

cargo install cargo-watch systemfd

Running

systemfd --no-pid -s http::3000 -- cargo watch -x run