Skip to content
This repository has been archived by the owner on May 17, 2018. It is now read-only.

Migrate away from Jade as Express's template language #27

Open
cianclarke opened this issue Feb 1, 2012 · 1 comment
Open

Migrate away from Jade as Express's template language #27

cianclarke opened this issue Feb 1, 2012 · 1 comment

Comments

@cianclarke
Copy link
Contributor

At present, Jade drives the key parts of index.html when a user first hits the app on 0.0.0.0:3000/ - this renders an outline HTML page, and on the client side dust then renders what's left.
There are three routes for this task, listed in order of preference:

  1. Have the very first app have Dust in Express.js (nodecode) render the very first page using res.render(), returning the full HTML required for the page load. This means first the very first time a user loads the page, no client-side templating takes place.
  2. Have Express.js serve up the contents of layout.jade as it exists at the moment, ported to dust & using the dust engine.
  3. Have Express.js serve up static HTML with no templating for the boilerplate instead of jade
@cianclarke
Copy link
Contributor Author

Lot of work done on this today in the 'jaded' branch - had 2) working within an hour, but 3 hours later stil didn't get to the stage described in 1) - proving quite difficult, but considering the benefits in initial page load time probably worthwhile

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant