couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Anderson" <>
Subject Re: Adding JS Libraries for Views?
Date Fri, 21 Nov 2008 00:43:32 GMT
I include the text from libs inline in the view function itself.

CouchRest has a helper called "couchview" that does this according to
some conventions that worked for me.

it ends up looking like

function(doc) {

... lots of js library code ...

blah blah...

emit(key, value)


this is good because you want the view to be erased if you change the
code that generates it.

On Thu, Nov 20, 2008 at 6:36 AM, Kerr Rainey <> wrote:
>> I would make your own .js file that includes your libraries and main.js,
>> then add that as a custom view server in local.ini. Then upgrades won't
>> break it. That's elegant enough for me.
> but then you wouldn't be able to replicate the design around.
> --
> Kerr

Chris Anderson

View raw message