Pre-Render Example

This page uses the new YUI/Express middleware for "pre-rendering".

As you will note in the code below, during the request we will call res.render() on the file passed into the middleware. Then create a YUI instance from that layout and attach it to the res/req objects. This allows you to have an active DOM inside your request handler.