Skip to main content

start_server

Function start_server 

Source
pub async fn start_server(
    db: Arc<Database>,
    port: u16,
    states_config: Arc<StatesConfig>,
) -> Result<(Sender<()>, SocketAddr)>
Expand description

Start the HTTP server on the specified port.

Returns a oneshot sender that can be used to signal shutdown, and the actual address the server is bound to.