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.

12 lines
350 B

6 years ago
  1. const express = require("express")
  2. const router = express.Router()
  3. const {storyApi} = require("../../rpdata/api/Story")
  4. const viewTemplate = require("../../marko/page/story-content/view.marko")
  5. module.exports = async(req, res, next) => {
  6. res.markoAsync(viewTemplate, {
  7. story: storyApi.find(req.params.id),
  8. selected: {index: true},
  9. })
  10. }