This commit is contained in:
2025-10-25 18:11:12 +08:00
parent b7221cf343
commit 7db680831d
3 changed files with 5 additions and 1 deletions

View File

@@ -0,0 +1 @@
This is a test file for hello-world post

View File

@@ -120,7 +120,8 @@ if dap_ok then
-- We need to query this to get the sysroot -- We need to query this to get the sysroot
-- ls $(rustc --print sysroot)/lib/rustlib/etc -- ls $(rustc --print sysroot)/lib/rustlib/etc
local rust_path = vim.fn.system("rustc --print sysroot") local rust_path = vim.fn.system("rustc --print sysroot")
-- vim.print(rust_path) -- trim trailing newline
rust_path =
local lldb_init = { local lldb_init = {
"command script import "..rust_path.."/lib/rustlib/etc/lldb_lookup.py", "command script import "..rust_path.."/lib/rustlib/etc/lldb_lookup.py",
"command source "..rust_path.."lib/rustlib/etc/lldb_commands", "command source "..rust_path.."lib/rustlib/etc/lldb_commands",

View File

@@ -11,6 +11,7 @@ use axum::{
}; };
use std::sync::Arc; use std::sync::Arc;
use tokio::sync::RwLock; use tokio::sync::RwLock;
use tower_http::services::ServeDir;
#[derive(Clone)] #[derive(Clone)]
struct AppState { struct AppState {
@@ -29,6 +30,7 @@ async fn main() {
let app = Router::new() let app = Router::new()
.route("/", get(index_handler)) .route("/", get(index_handler))
.nest_service("/posts", ServeDir::new("posts"))
.route("/:page", get(all_handler)) .route("/:page", get(all_handler))
.route("/p/:post_name", get(post_handler)) .route("/p/:post_name", get(post_handler))
.with_state(app_state); .with_state(app_state);