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 express = require("express") const router = express.Router()
const common = require("./common") const {storyApi} = require("../../rpdata/api/Story") const {Tag} = require("../../rpdata/api/Tag")
const listTemplate = require("../../marko/page/story/list.marko")
router.get("/:tagkind/:tagname", common, async(req, res) => { try { const tag = new Tag(req.params.tagkind, req.params.tagname)
res.markoAsync(listTemplate, { stories: storyApi.list({tags: tag}), menuTags: [tag], selected: {tag: `${tag.kind}:${tag.name}`}, }) } catch(err) { console.error(err) } })
module.exports = router
|