Skip to content

Instantly share code, notes, and snippets.

@MattMcFarland
Last active August 29, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MattMcFarland/82247738d9ae2abd90df to your computer and use it in GitHub Desktop.
Save MattMcFarland/82247738d9ae2abd90df to your computer and use it in GitHub Desktop.
Start up a couch db database for npm registry

Usage

sudo couchdbnow.sh username password
#/bin!bash
HOST="http://127.0.0.1:5984"
curl -X PUT $HOST/registry
curl -X PUT $HOST/_config/admins/$1 -d '"$2"'
npm start --npm-registry-couchapp:couch=http://$1:$2@localhost:5984/registry
npm run load --npm-registry-couchapp:couch=http://$1:$2@localhost:5984/registry
npm run copy --npm-registry-couchapp:couch=http://$1:$2@localhost:5984/registry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment