Skip to content

kosgensys/fregate-rs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fregate-rs

Developing an HTTP server requires to add code for logging, configuration, metrics, health checks etc. This crate aims to solve these problems providing user with Application builder for setting up HTTP service.

Work in progress

This project is in progress and might change a lot from version to version.

Usage example

use fregate::{
    axum::{routing::get, Router},
    bootstrap, Application, Empty,
};

async fn handler() -> &'static str {
    "Hello, World!"
}

#[tokio::main]
async fn main() {
    let config = bootstrap::<Empty, _>([]);

    Application::new(&config)
        .router(Router::new().route("/", get(handler)))
        .serve()
        .await
        .unwrap();
}

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%