feat: restructure project, implement askama templating #26
@ -1,9 +1,12 @@
|
||||
use ::clego::get_router;
|
||||
use std::path::Path;
|
||||
use std::env;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
let router = get_router(Path::new("/assets"));
|
||||
let manifest_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
|
||||
let assets_path = Path::new(&manifest_dir).join("assets");
|
||||
let router = get_router(assets_path.as_path());
|
||||
|
||||
// TODO: select port based on available port (or ask in CLI)
|
||||
let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap();
|
||||
|
Loading…
Reference in New Issue
Block a user