You will need an Apache CouchDB installation to mirror CRANDB locally. The server that runs CouchDB is created by packer, and the packer template is included in the Cranny project. In particular, CouchDB is installed and configured with a provisioner script.
We use CouchDB vhosts and URL rewriting to provide a nice clean http API.
Unfortunately this makes mirroring a little more difficult, because for (pull) mirroring to work, the slave should have access to the raw URLs, without rewriting. The trick is to use the IP address of the master for the pull, because URL rewriting only happens on the hostname, but not on the IP address.
iptables
, or nginx
, or whatever you
like (optional).cran
.Then query something that triggers indexing, e.g.
http://localhost:5984/-/events?limit=10&descending=true (or replace
localhost:5984
with your server). Indexing can be slow, actually, and
may take several minutes.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.