Files
zhenyi 47ed59c9d6 refactor: extract AppksServer as library, thin main.rs to bootstrap-only
- Add AppksServer / AppksServerBuilder to lib.rs
- Move DB/Redis/Cache/S3/etcd/NATS init into builder
- Move gRPC server spawn, JWT rotation, actix-web HTTP into serve()
- Expose service() getter for embedding without the built-in servers
- main.rs reduced to ~10 lines
2026-06-12 21:37:07 +08:00

17 lines
335 B
Rust

use appks::{AppksServer, config::AppConfig};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
tracing_subscriber::fmt::init();
let config = AppConfig::load();
let server = AppksServer::builder()
.config(config)
.build()
.await?;
server.serve().await?;
Ok(())
}