Last active
August 29, 2015 14:08
-
-
Save tnarik/d6e8593b577822a92cb7 to your computer and use it in GitHub Desktop.
node and npm and registry
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
## Better Node installation | |
## | |
# Install node from the packages as usual if you feel so inclined, or install NVM instead (or as a second step) | |
curl https://raw.githubusercontent.com/creationix/nvm/v0.17.3/install.sh | bash | |
# Edit .zshrc to add the sourcing of the file | |
``` | |
# Hook nvm | |
source $HOME/.nvm/nvm.sh | |
``` | |
nvm install 0.10.33 | |
nvm use 0.10.33 | |
nvm alias default 0.10.33 | |
# And install some node packages there instead of the system level | |
npm -g install yo | |
npm -g install grunt-cli | |
npm -g install bower | |
nvm -g install couchapp # For the registry | |
# To check what is installed: | |
npm -g list | grep -v '^ ' | grep -v '^│ ' | |
## | |
## NPM Registry mirror | |
## | |
brew install couchdb | |
## From the output of 'brew install' | |
#To have launchd start couchdb at login: | |
ln -sfv /usr/local/opt/couchdb/*.plist ~/Library/LaunchAgents | |
#Then to load couchdb now: | |
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.couchdb.plist | |
#To verify success | |
curl http://127.0.0.1:5984 | |
#To trigger replication without attachments (way less storage required) | |
curl -X POST http://127.0.0.1:5984/_replicate -d '{"source":"https://skimdb.npmjs.com/registry/", "target":"registry", "create_target":true}' -H "Content-Type: application/json" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment