1
0
mirror of https://github.com/actix/actix-website synced 2025-06-28 16:00:36 +02:00

add back page about auto reloading

For folks finding this page via search engines, there was still info
regarding listenfd and systemfd which is no longer recommended.
This commit is contained in:
Rob Ede
2020-11-24 21:07:20 +00:00
parent 3a571e036a
commit b25e6ee17b

View File

@ -0,0 +1,22 @@
---
title: Autoreloading
menu: docs_patterns
weight: 1000
---
# Auto-Reloading Development Server
During development it can be very handy to have cargo automatically recompile the code on change.
This can be accomplished very easily by using [cargo-watch][cargowatch].
```sh
cargo watch -x 'run --bin app'
```
## Historical Note
An old version of this page recommended using a combination of systemfd and listenfd, but this has
many gotchas and was difficult to integrate properly, especially when part of a broader development
workflow. We consider [`cargo-watch`] to be sufficient for auto-reloading purposes.
[`cargo-watch`]: https://github.com/passcod/cargo-watch