fix: enhance code content display with syntax highlighting and improve logging structure

This commit is contained in:
2026-01-12 16:14:47 +01:00
parent 1b295aa843
commit 0685de8ffa
5 changed files with 86 additions and 21 deletions

View File

@@ -13,7 +13,7 @@ use std::{env, fs, path::PathBuf, sync::LazyLock};
pub static HTML_DIR: &str = "data/html/";
pub static LOG_DIR: &str = "data/logs/";
pub static DATA_STORAGE: &str = "data/storage/";
pub static LOG_FILE_NAME: &str = "log.txt";
pub static BIND_ADDR: LazyLock<String> = LazyLock::new(|| match env::var("BIND_ADDR") {
Ok(addr) => {
@@ -88,8 +88,8 @@ async fn catch_all(req: HttpRequest, _payload: Option<web::Json<Value>>) -> acti
#[actix_web::main]
async fn main() -> std::io::Result<()> {
let _ = fs::create_dir_all(DATA_STORAGE);
let _ = fs::create_dir_all(LOG_DIR);
let _ = fs::remove_file(format!("{}{}", LOG_DIR, LOG_FILE_NAME));
let assets = data_mgt::AssetTracker::new();