feat: add basic blog features

This commit is contained in:
2026-03-09 22:17:39 +01:00
commit c16657f996
29 changed files with 3095 additions and 0 deletions

14
routes/posts.js Normal file
View File

@@ -0,0 +1,14 @@
import express from "express";
import convertToHTML from "rb26";
import PostController from "./../controllers/Post.controller.js";
var router = express.Router();
router.get("/:id", async function (req, res, next) {
const post = await PostController.get(req.params.id);
console.log(post);
res.render("post", { post: post, html: convertToHTML(post.content) });
});
export default router;