Name: npm2es2
Owner: npm
Description: fork of npm2es that supports npm's modern configuration and dockerization approaches.
Created: 2017-08-03 23:34:28.0
Updated: 2018-01-22 18:48:57.0
Pushed: 2018-03-16 17:43:07.0
Homepage: null
Size: 54
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
push npm package metadata into elasticsearch for querying
npm install -g @npm/npm2es2
USAGE: npm2es2 --couch="http://host:port/db" --es="http://host:port/index"
npm2es
also takes a --since=<seq number>
command line argument incase you want to skip a full re-index
npm2es --couch="http://localhost:5984/registry" --es="http://localhost:9200/npm"
This will attach to the provided couchdb's _changes
feed and automatically put every
package into elasticsearch for indexing. This script will run for as long as you let it, automatically applying updates to the search index.
First off, you'll want the following installed
couchdb
(i.e. which couchdb
should work)java
(i.e. which java
should should)mocha
(npm install -g mocha
)Now we can run the test, just run npm test
The following environment variables may be used to configure this service:
COUCH_URL
the URL of the CouchDB to followELASTIC_SEARCH
the host (<host>[:port]
) of the ElasticSearch to populateQUEUE_DEPTH
max number of docs in the backlog queue (default is 2048)MONITOR_PORT
port to which the monitor service should bind (default is 5000)METRICS
URL of the metrics sink (normally a nsqd URL)METRICS_REPORT_FREQUENCY
the frequency (in milliseconds) at which to report metrics
(default is 10000)LEADER_SEQUENCE_POLL_FREQUENCY
the frequency (in milliseconds) at which to poll the
leader (source CouchDB) for its maximum sequence number (default is 10000)MIT © 2013 solids l.l.c.