rgrove / combohandler

A simple Yahoo!-style combo handler in Node.js.
MIT License
116 stars 32 forks source link

dynamicPath middleware #17

Closed evocateur closed 11 years ago

evocateur commented 11 years ago

This supports route params (e.g., :version) that point to different trees under the same filesystem root. At Zillow, we use an MD5 hash in the path to version requests for certain routes, which correspond to unique subtrees under the configured rootPath. This middleware code is waaaay more robust than the current hacky (non-middleware) code in our production environment.

I'm using this pull request to goad/remind myself to write docs on Monday. :shipit: