WIP
This commit is contained in:
1
posts/hello-world/test.txt
Normal file
1
posts/hello-world/test.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
This is a test file for hello-world post
|
||||||
@@ -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",
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user