1
0
mirror of https://github.com/actix/examples synced 2024-12-18 08:23:10 +01:00
examples/self-shutdown-route/README.md
2020-01-26 08:49:19 +09:00

654 B

self-shutdown-route

Demonstrates how to shutdown the web server using a route hosted by the server itself using channels.

This technique can be easily modified to support shutting down the server using other kinds of external events. Created in response to actix/actix-web#1315.

Usage

Running The Server

cargo run --bin self-shutdown-route

# Starting 8 workers
# Starting "actix-web-service-127.0.0.1:8080" service on 127.0.0.1:8080

Available Routes