couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benoit Chesneau <>
Subject Re: Rewrite inside of a path segment
Date Thu, 25 Oct 2012 17:50:38 GMT
On Thu, Oct 25, 2012 at 6:41 PM, Ryan Ramage <> wrote:
> Wow, I like the idea of a rewriter function. It does add a lot of
> power. Some things to consider...
> I know others had rewriter rewrites in mind, namely benoit and jhs.
> Would be nice if they thought this was inline with their ideas. Just
> if we introduce it now like this we want to make sure its compatible
> with the ideas.
> Can you add the function as part of an array of rewrites? maybe like this:
> rewrites : [
>    {from : "/something", to : "/somethingelse"},
>    "function(req, path) { ...}"
> ]
> If moved ahead, I also would want to just have a check on
> erica/couchapp tools to make sure could handle this syntax. No one
> likes writing js functions inside of strings in a json file :)

Well first version of the rewriter was based on a function [1]. After
long discussions it wasn't accepted for performances reasons. I'm not
sure we should accept it for now until we change the js evaluation.

My other experiments for the rewriter are on the couchapp-ng repo [2].
I have another try coming but it is using my new elixir [3] app

- benoƮt


View raw message