47ed59c9d6
- 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
17 lines
335 B
Rust
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(())
|
|
}
|