Crates.io | fregate |
lib.rs | fregate |
version | 0.19.0-3 |
source | src |
created_at | 2022-08-08 05:32:31.607577 |
updated_at | 2024-02-09 18:14:36.927666 |
description | Framework for services creation |
homepage | https://github.com/elefant-dev/fregate-rs |
repository | https://github.com/elefant-dev/fregate-rs |
max_upload_size | |
id | 640643 |
size | 266,695 |
Set of instruments to simplify http server set-up.
This project is in progress and might change a lot from version to version.
use fregate::{
axum::{routing::get, Router},
bootstrap, tokio, AppConfig, Application,
};
async fn handler() -> &'static str {
"Hello, World!"
}
#[tokio::main]
async fn main() {
let config: AppConfig = bootstrap([]).unwrap();
Application::new(config)
.router(Router::new().route("/", get(handler)))
.serve()
.await
.unwrap();
}
here
.