Node.js, Express, Jade & Template in Package

Is it possible to store templates for an express application in a separate package?

In my usecase I'd like to have a shared package containing global templages to give all apps the same look and feel even so they run as an independent entity on another port or even another server. Local content templates could live within the app, so all I'm looking for is a way to share that kind of code between multiple apps.

Going a step further I was thinking about skinning packages which can overwrite the default templates. Once installed in the "template package" it could change the look and feel of all applications using the core templates.

Is there a way of doing that without having to drop the comfort of express?

cu Roman

This is possible using express. You can basically mount a whole app object to a specific route (with all routes and middleware).

var express = require('express');
var coreApp = express();
var blogApp = express();
var wikiApp = express();

// init blogApp and wikiApp with middleware and routes

coreApp.use('/blog', blogApp);
coreApp.use('/wiki', wikiApp);

Now you can mount your templates into this modular apps and then mount them into your core app.

Here's a screen cast from the express creator himself, called modular web applications.