mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 13:14:58 +05:00
19 lines
No EOL
472 B
JavaScript
19 lines
No EOL
472 B
JavaScript
const express = require("express"),
|
|
router = express.Router(),
|
|
fs = require("fs"),
|
|
marked = require("marked");
|
|
|
|
router.get("/", function (req, res) {
|
|
var md = function (filename) {
|
|
return marked.parse(fs.readFileSync("./dashboard/views/docs/" + filename, "utf8"));
|
|
};
|
|
|
|
res.render("updates", {
|
|
user: req.userInfos,
|
|
translate: req.translate,
|
|
currentURL: `${req.client.config.dashboard.baseURL}/${req.originalUrl}`,
|
|
"md": md
|
|
});
|
|
});
|
|
|
|
module.exports = router; |