Browse Source

server: Added all templates to initial render to speed things up.

1.0
Gisle Aune 6 years ago
parent
commit
366c0f0d9f
  1. 4
      server.js

4
server.js

@ -92,8 +92,12 @@ app.get("/", function(req, res) {
// Render common templates // Render common templates
require("./marko/page/story/list.marko").render() require("./marko/page/story/list.marko").render()
require("./marko/page/story/tag-list.marko").render({tags: []})
require("./marko/page/logs/list.marko").render() require("./marko/page/logs/list.marko").render()
require("./marko/page/data/channels.marko").render({channels: [], user: {}})
require("./marko/page/data/characters.marko").render({characters: [], user: {}})
require("./marko/page/story-content/view.marko").render({story: {chapters: []}}) require("./marko/page/story-content/view.marko").render({story: {chapters: []}})
require("./marko/page/logs-content/view.marko").render({log: {posts: [], channel: {}}})
// Start server // Start server
app.listen(config.port, function() { app.listen(config.port, function() {

Loading…
Cancel
Save