1
0
mirror of https://github.com/actix/examples synced 2025-06-26 17:17:42 +02:00

enhanced, renamed shutdown example and modified async_pg readme

This commit is contained in:
dowwie
2020-01-31 07:10:56 -05:00
parent 78a753a06a
commit da72aef69c
7 changed files with 42 additions and 13 deletions

27
shutdown-server/README.md Normal file
View File

@ -0,0 +1,27 @@
# shutdown-server
Demonstrates how to shutdown the web server in a couple of ways:
1. remotely, via http request
- Created in response to actix/actix-web#1315
2. sending a SIGINT signal to the server (control-c)
## Usage
### Running The Server
```bash
cargo run --bin shutdown-server
# Starting 8 workers
# Starting "actix-web-service-127.0.0.1:8080" service on 127.0.0.1:8080
```
### Available Routes
- [GET /hello](http://localhost:8080/hello)
- Regular hello world route
- [POST /stop](http://localhost:8080/stop)
- Calling this will shutdown the server and exit