Version control couchdb

How do I manage map / reduce function versions for CouchDB? I would like to be able to test them on git / github so that my teammates can easily apply them in their local test environments. I know what replicated functions are in CouchDB, but I would like to keep the db views with the source for the project.

+6
source share
2 answers

What you need is one of the many kuchapp tools. Basically, they all map a bunch of js files in various structures into the doc design layout used by CouchDB, and usually provide some simple push / pull mechanisms for entering and exiting them.

Then you can git init in the main folder and make sure that you are updating your uploaded project documents.

There's a pretty good explanation http://mindeavor.com/blog/the-anatomy-of-a-couchapp just ignores the provider / discussion at the moment, it is not required.

If you look more like JS / node, try https://github.com/mikeal/node.couchapp.js/ or kanso http://kan.so/ is awesome, but it does a lot more; You may find that you need more Couch-fu before you get into it. This is excellent, however, you can get it just by using kanso push to get started.

If you just want to get started, use couchapp http://github.com/couchapp/couchapp , which is a python tool, possibly original.

+5
source

We (and I'm sure most teams) are doing exactly what you said. We keep our ideas, etc. In our source tree and fix git. Our application is a node application, so itโ€™s very easy for us to break into the source code and save them to the database, but itโ€™s pretty simple in any language - just come up with a naming scheme, save the JS files to a specific location, and read the files and save the data in the appropriate key structure in the corresponding _design/document in your database.

+1
source

Source: https://habr.com/ru/post/919341/


All Articles