On 25/10/2012 18:41 , Ryan Ramage wrote:
Wow, I like the idea of a rewriter function.

Me too :)

Can you add the function as part of an array of rewrites? maybe like this:

rewrites : [
    {from : "/something", to : "/somethingelse"},
    "function(req, path) { ...}"
]

I considered that option, but I couldn't find a strong reason to justify the added complexity. And if no one likes writing functions in strings, I doubt anyone would enjoy writing multiple functions as string list items :)

Note though that there's nothing in this incompatible with any couchapp system — all that exists just works, and you can take advantage of this just by automatically stringifying functions (which as a matter of fact is what I'm doing).

--
Robin Berjon - http://berjon.com/ - @robinberjon

Reply via email to