Where are view files and also what files to gitignore to version control view files

Hi,
I’m new to Couchbase, and couldn’t find any .js or view related files in /opt/couchbase/, which I want to use git to keep track of. I’m also hoping if anyone here has had experiences of version control on the views, map/reduces or design docs could share them here, such as what files to gitignore. Thanks in advance!!

View definitions stored in the couchbase database and replicated over the cluster. I think what you need is some mechanism to maintain views in actual state during application deployment.

If you are ruby developer, there is such feature in https://rubygems.org/gems/couchbase-model, by default it stores view definition in the following directory layout:

.
└── app
    └── models
        ├── link
        │   ├── total_count
        │   │   ├── map.js
        │   │   └── reduce.js
        │   ├── by_created_at
        │   │   └── map.js
        │   └── by_view_count
        │       └── map.js
        └── link.rb

where link is design document name, and total_count, by_created_at and by_view_count – view names.

The library decides whether to update views using checksums and file modification times.

So to recap, this feature is rather client-side than server-side.

Hi avsej,
I see. I just started using the Java client SDK to communicate with my Amazon Couchbase instances, where I created views and design docs via the web interface. So by the last line of your answer, did you mean all the .js files can only be seen on the client side with the Ruby tool? And many thanks again!