Krys4lide/crates/clego/src/main.rs

12 lines
330 B
Rust
Raw Normal View History

use ::clego::get_router;
use std::path::Path;
#[tokio::main]
async fn main() {
let router = get_router(Path::new("/assets"));
// TODO: select port based on available port (or ask in CLI)
let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap();
axum::serve(listener, router).await.unwrap();
}