From 7796ce2d377b052d7513427c6bcf1946d09edaef Mon Sep 17 00:00:00 2001 From: "hex (asiago)" Date: Mon, 3 Jun 2024 08:14:41 +0200 Subject: [PATCH] add static file support (quick express thing) --- src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/index.ts b/src/index.ts index 907e09a..dcf75b3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -72,4 +72,6 @@ app.use("/post/:post", async (req:express.Request,res:express.Response) => { res.render(`post`, {posts: posts, post: post[0], config: config}) }) +app.use('/static', express.static(path.join(__dirname, '../', 'data',"static"))) + app.listen(3024)