self_service 0.0.0

A microservice chassis for HTTP services
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::net::TcpListener;

use tracing::{info, instrument};

use crate::routes::routes;

#[instrument(skip_all)]
pub async fn start(listener: TcpListener) -> eyre::Result<()> {
    info!("Server started!");

    axum::Server::from_tcp(listener)?
        .serve(routes().into_make_service())
        .await?;
    Ok(())
}