42个版本 (16个重大变更)
0.19.0-3 | 2024年2月9日 |
---|---|
0.18.0 |
|
0.17.1 | 2023年11月16日 |
0.14.0 | 2023年7月21日 |
0.5.0 | 2022年11月24日 |
#1565 in Web编程
每月246次下载
185KB
4.5K SLoC
fregate-rs
简化http服务器设置的仪器集。
进行中
此项目正在开发中,版本之间可能变化很大。
示例
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();
}
更多示例可以在这里
找到。
lib.rs
:
简化http服务器设置的仪器集。\
此项目正在开发中,版本之间可能变化很大。
示例
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();
}
示例
示例可以在这里
找到。
依赖项
~28–46MB
~769K SLoC