0%

npm analyzer project: part 2

CouchDB

Apache CouchDB lets you access your data where you need it. The Couch Replication Protocol is implemented in a variety of projects and products that span every imaginable computing environment from globally distributed server-clusters, over mobile phones to web browsers.
Since I am working in treehouses/cli vagrant in which CouchDB docker already installed, I need to run couchDB docker.

1
docker run -d -p 5984:984 --name=vmnet8 treehouses/couchdb:2.3.1

then open localhost:5984 on my browser

It shows couchDB installed

Create a new database named npms

visit localhost:5984/_utils, you can see the new database npms is created

Setup npm replication from https://replicate.npmjs.com/registry to npm database in continuous mode

waiting for a while, the replication will be done

For the replication to work, I might need to add some CouchDB config:

you can see in the replication config file, the auth plugin added

Creating the document _design/npms-analyzer in the npms database with the contents of https://github.com/npms-io/npms-analyzer/blob/master/config/couchdb/npms-analyzer.json