I'm not very familiar with express, but I just looked at the template system to see what I can do.
I don't think you would get a ton of benefit out of this library with express as is.
An express website would get the most benefit out of this library if they had a system so that the route your http server picked could also manually call routes which would add additional content to the page.
For example, something like the following would allow bifocals to work its magic.
app.get(/^\/user\/(\d+)$/, function (req, res) {
res.render('user.html', {user: req.params[0]});
});
app.get(/^\/home$/, function(req, res){
app.perform_request('/user/1234', res.child('content', 'user_widget.html');
res.render('home.html');
});
If I accessed /user/1234 in my browser, I would see a user's profile page.
If I accessed /home in my browser, I would see the home page and a user widget containing user 1234's data.Both times you see a user, they have executed the same route function, but you can change the templates and inject them into other templates asynchronously. You can do this unlimited times within one route, and to an unlimited depth (depending on your system resources of course)
Bifocals also offers some of it's own features, multiple rendering systems, http header+status code handling, and more.