Accessing CouchDB
The NoteStore
service and NoteApp
client from the previous sections were written in D. Therefore, there was no problem in using the service. However, the main idea of REST is to be independent of the service implementation. This is best shown by using a different service.
CouchDB is another document-based database. It is written in the Erlang
programming language and offers a REST interface that you can use to implement NoteStore
.
Installing CouchDB
The website of CouchDB is http://couchdb.apache.org/. Here, you can find detailed installation instructions and precompiled binaries for OS X and Windows. Building from the source requires the Erlang programming language. For a quick start, you can use the version of your distribution:
On Ubuntu/Debian, type the following to install CouchDB:
$ sudo apt-get install couchdb
On Fedora 21 or earlier, you can install CouchDB with the following:
$ sudo yum install couchdb
On Fedora 22, you type as follows:
$ sudo dnf install couchdb...