On Saturday, July 2, 2011 at 9:33 PM, Phil Cockfield wrote:
With [express.static] doing something like this:
app.use(express.static(__dirname + '/public'));
Will allow the [public] folder to server static assets from the URL
starting at /
But say I have another static resources folder I want to open up, which is organized somewhere else within the project (for instance, within a module within the node_modules folder).
Say I wanted to have resources within this other static folder come off URL's starting at:
How would I do that? When I use [express.static] multiple times, I see that those folders all start at the root of the URL.
I guess I could namespace by putting everything within a named folder within the actual folder I'm passing to [express.static], but is there a more elegant way to do this - like pass a URL argument to app.use?