Last active
August 29, 2015 14:05
-
-
Save james-huston/982b6b672fb0d6fe726c to your computer and use it in GitHub Desktop.
Setup npm repo on RHL/CentOS
This file contains hidden or 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
# enable epel repo | |
# install couchdb | |
sudo yum install couchdb | |
# create the ini file | |
echo "[httpd] | |
bind_address = 0.0.0.0 | |
[couch_httpd_auth] | |
public_fields = appdotnet, avatar, avatarMedium, avatarLarge, date, email, fields, freenode, fullname, github, homepage, name, roles, twitter, type, _id, _rev | |
users_db_public = true | |
secret = ee8af8230f5ca3a22ed85ac5d50f048b | |
[httpd] | |
secure_rewrites = false | |
[couchdb] | |
delayed_commits = false | |
[log] | |
level = info | |
[vhosts] | |
# uncomment this line once you have the /registry db started | |
#registry.articulate.io:5984 = /registry/_design/app/_rewrite | |
[admins] | |
" > ~/articulate.ini | |
sudo mv ~/articulate.ini /usr/local/etc/couchdb/local.d/ | |
sudo chown couchdb:couchdb /usr/local//etc/couchdb/local.d/artciculate.ini | |
sudo service restart couchdb | |
# download and install kappa | |
mkdir npmproxy | |
cd npmproxy | |
npm init | |
npm install --save kappa | |
echo '{ | |
"servers": [ | |
{ | |
"host": "0.0.0.0", | |
"port": 80 | |
} | |
], | |
"plugins": { | |
"kappa": { | |
"vhost": "registry.articulate.io", | |
"paths": [ | |
"http://registry.articulate.io:5984/", | |
"https://registry.npmjs.org/" | |
], | |
"logLevel": "info" | |
} | |
} | |
}' > config.json | |
sudo npm start | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment