Get Server::Starter listeners for rust application
This crate providers startserver / startserver listeners for rust server applications.
```rust use actixweb::{HttpServer, App}; use serverstarter_listener::{listeners, ServerStarterListener};
let listener = listeners().unwrap().pop().unwrap(); match listener { ServerStarterListener::Tcp(listener) => { HttpServer::new(|| App::new()).listen(listener).unwrap().run().unwrap(); } _ => unimplemented!(), } ```
You need to start application using startserver / startserver.
```sh
startserver --port=80 -- yourserver_binary ```
Now you can do hot-deploy by send SIGHUP
to start_server
process.
start_server
share file descriptor to new process and send SIGTERM
to old process.
Some additional info here
License: MIT OR Apache-2.0