I am using CouchDB Futon to edit the views and shows. But I find it hard to edit the JavaScript code because of converting the newline to "\n". Also, it is hard to do all the escaping work.
What do you use to edit your views?
Basically views are JavaScript codes which will be put in a document inside the database that they operate on. This special document is called Design document in CouchDB. Each Design document can implement multiple view. Please consult Official CouchDB Design Documents to learn more about how to write view.
A permanent view is stored as a special kind of document between the other regular documents. These special kind of documents are called 'design documents'. A permanent view can be executed by performing a GET operation with the name of the view.
Open the Overview page of the database and select New Document option as shown below. When you select the New Document option, CouchDB creates a new database document, assigning it a new id. You can edit the value of the id and can assign your own value in the form of a string.
Creating a Database using Futon To create a database open the http://127.0.0.1:5984/_utils/. You will get an Overview/index page of CouchDB as shown below. In this page, you can see the list of databases in CouchDB, an option button Create Database on the left hand side. Now click on the create database link.
Maybe you want to have a look at the CouchApp framework. It allows you to have your map, reduce, show, list etc. functions in text files you can edit with the editor of your choice. A simple command pushes them to your design documents. It is intended for building CouchApps, but might as well be useful if you only need to edit your views.
You can edit view code by browsing to it in Futon, and then expanding the source code area. You can then save/undo, etc.
For the other functions, and views too, you can always use LoveSeat.
Cheers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With