node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org ยป



Search the npm registry and save results in MongoDB. Made to be run from a cron task.

npm install npm-search-store -g


KEYWORDS=journster npm-search-store

or if you git pull:

KEYWORDS=journster npm start

The crontab I use for looks like this:

*/15 * * * * KEYWORDS=journster /usr/bin/node /usr/local/bin/npm-search-store

Environment variables


    MongoDB Connection String URI. If not specified, it will default to: mongodb://localhost:27017/npm-search-store


    A required comma separated list of keywords to search for.


If you see this:

$ npm search journster
npm WARN Building the local index for the first time, please be patient
npm http GET
npm http 200

The solution might be to download the npm cache to your machine:

wget -O ~/.npm/-/all/.cache.json

Other hacks via npm/npm#3867. Adding a swap file worked for me.