feat(kernel): complete tree-first graph tasks 074-080
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
use mnote_web::{build_app, AppConfig, AppState};
|
||||
use tokio::net::TcpListener;
|
||||
use tracing::info;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
init_tracing();
|
||||
|
||||
let config = AppConfig::from_env();
|
||||
let bind_addr = config.bind_addr.clone();
|
||||
let app = build_app(AppState::new(config));
|
||||
let listener = TcpListener::bind(&bind_addr).await?;
|
||||
|
||||
info!(bind_addr = %bind_addr, "mnote-web 最小骨架已启动");
|
||||
axum::serve(listener, app).await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn init_tracing() {
|
||||
tracing_subscriber::fmt()
|
||||
.with_target(false)
|
||||
.compact()
|
||||
.try_init()
|
||||
.ok();
|
||||
}
|
||||
Reference in New Issue
Block a user