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.

20 lines
449 B

6 years ago
  1. const express = require("express")
  2. const router = express.Router()
  3. const common = require("./common")
  4. const {storyApi} = require("../../rpdata/api/Story")
  5. const listTemplate = require("../../marko/page/story/list.marko")
  6. router.get("/", common, (req, res) => {
  7. try {
  8. res.markoAsync(listTemplate, {
  9. stories: storyApi.list(),
  10. selected: {index: true},
  11. })
  12. } catch(err) {
  13. console.error(err)
  14. }
  15. })
  16. module.exports = router