The frontend/UI server, written in JS using the MarkoJS library
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
const fs = require("fs") const express = require("express") const less = require("less")
const router = express.Router()
let lessData = "" let data = "" for (const name of fs.readdirSync("./marko/global/", "utf8")) { data += fs.readFileSync("./marko/global/"+name, {encoding:"utf8"}) + "\n\n" } data = less.render(data, (err, output) => { if (err == null) { lessData = output.css } })
router.get("/", (req, res) => { res.contentType("text/css").end(lessData) })
module.exports = router
|