Couchdb

#database-systems

2018/09/19 – Introduction ยท RxDB - Documentation Reactive, serverless, client-side, offline-first database in javascript.

2015/07/16 – Fauxton and PouchDB

2016/12/6 – PouchDB, the JavaScript Database That Syncs | Hacker News

Python Libraries

Authentication

Installing Couchdb from source

For ubuntu: see this page

My notes from a working installation:

Installation dependencies

NSPR

./configure --prefix=/usr/local
make
make install

Spidermonkey

Reference

## Build
# make JS_DIST=/usr/local JS_THREADSAFE=1 -f Makefile.ref #notused
# make BUILD_OPT=1 -f Makefile.ref #notused

make BUILD_OPT=1 JS_DIST=/usr/local JS_THREADSAFE=1 -f Makefile.ref

## Install
make BUILD_OPT=1 JS_DIST=/usr/local JS_THREADSAFE=1 -f Makefile.ref export
# note the use of `export` target

Alternative: Install the binaries using:

# apt-get install libmozjs-dev

libcurl

./configure --prefix=/usr/local
make
make install

LibICU

svn co http://source.icu-project.org/repos/icu/icu/trunk/ ./icu
cd source
./configure --prefix=/usr/local

Couchdb

export ERL=/usr/local/erlang/bin/erl
export ERLC=/usr/local/erlang/bin/erlc
./configure --prefix=/usr/local/couchdb --with-erlang=/usr/local/erlang/lib/erlang/erts-5.8/include/

on ubuntu 11.04 + couchdb-1.10

./configure --with-js-lib=/usr/lib/xulrunner-devel-1.9.2.17/lib --with-js-include=/usr/lib/xulrunner-devel-1.9.2.17/include --prefix=$HOME/couchdb-1.1.0"

Couchdb books

Tips and tricks

FAQ

What port is couchdb running on under Ubuntu
\$ dbus-send –session –print-reply –dest=org.desktopcouch.CouchDB / org.desktopcouch.CouchDB.getPort
How to I login to couchdb running at http://localhost:randomport ?
open up file:///home/USERNAME/.local/share/desktop-couch/couchdb.html in the browser. Replace USERNAME with your user name. A link on that page, which has a randomly generated username:password will be take you to the admin interface.
How to set up authorisation on a per database basis?
See this SO discussion

Session dumps

Posting a multline JSON data:

$ curl -X PUT -H "content-type: application/json" http://user:pass@localhost:5984/hdb/d001 --data-binary @-

{“enerygb”: 7.96594, “powerreacsum”: 0, “powerreacc”: 0, “demandc”: 0.0, “currenta”: 0} \^D