couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Davis <paul.joseph.da...@gmail.com>
Subject Re: CouchDB quoted functions
Date Mon, 18 Oct 2010 16:03:34 GMT
On Mon, Oct 18, 2010 at 12:00 PM, Alex Ivasyuv <industral@gmail.com> wrote:
> Hi,
>
> I working with _update handlers in CouchDB, and writting functions for them.
> As per http://wiki.apache.org/couchdb/Document_Update_Handlers these
> functions should be quoted, as document should be presented as JSON.
>
> I faced an issue, that my functions became large and large, and it's very
> difficult to edit them right in browser (Futon).
> I found, that editing functions for view is more easyly, as there're
> provided some useful UI.
> But I didn't find the same for design docs.
>
> So the questions are:
>
> 1. Is there a simple way for editing _update handle functions right in
> browser with code formatting, like for views?

I don't think there's a UI for editing _update handlers yet.

> 2. Are there some tools, to wring a view code in separate file, and later
> transform it to JSON?
>

Try the couchapp scripts that will load a file system layout as a JSON document.

You might also want to learn about the CommonJS module system for
importing code into your functions.

HTH,
Paul Davis

> Thanks in advance,
>
>

Mime
View raw message