How to manage CouchDB code?

I am new to CouchDB. So, I have a lot of questions about this, but let me focus on one of them.

CouchDB has this javascript code concept (validation + map-reduce + show +?), Which is written in project documents . This is part of a database, such as stored procedures or triggers for more traditional databases.

Is there anyone supporting this code inside the project so that we can really test this code like any other javascript code (via jspec, for example, mocking dependencies), the version in the same repository as the version of the rest of the code, probably in separate folder .. is it possible and used ? Or is this not good for some reason I should know?

What I would like to have is some way to do one rake task and my couchdb design documents are in sync with the project, something like this might be useful.

In the case of ruby, it would also be useful to do some dynamic magic (for example, default views and checks, new views using the named areas).

+7
javascript ruby couchdb jspec
source share
2 answers

Check out CouchApp: http://github.com/couchapp/couchapp

This is a set of python scripts that take a structured file system of js files (among others) and convert it into a well-formed Doc project.

(Forgive me if I misunderstood your question)

+4
source share

Yes, we save our view code in files and test them on git, and then use a script synchronization to push them to production as soon as we are sure that they work.

0
source share

All Articles