https://github.com/victorb/clone-npm
https://github.com/victorb/clone-npm
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/victorb/clone-npm
- Owner: victorb
- Created: 2018-03-29T12:33:10.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-29T12:33:23.000Z (over 8 years ago)
- Last Synced: 2025-02-22T04:14:18.298Z (over 1 year ago)
- Language: Go
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
- Got new instance
- Make sure security group for port 5984 is open
- Run `echo "deb https://apache.bintray.com/couchdb-deb xenial main" | sudo tee -a /etc/apt/sources.list`
- Run `curl -L https://couchdb.apache.org/repo/bintray-pubkey.asc | sudo apt-key add -`
- Run `sudo apt update`
- Run `sudo apt install couchdb`
- Change config to bind public IP
- Go to 54.183.196.81:5984/_utils/
- Setup replication
- http://54.183.196.81:5984/_utils/#/replication/_create
- http://skimdb.npmjs.com/registry
- Create new view
- http://54.183.196.81:5984/_utils/#/database/npm-registry/new_view
- _design/main
- index name: all-versions
```
function (doc) {
var versions = {}
Object.keys(doc.versions).forEach(function(version) {
versions[version] = doc.versions[version].dist
})
emit(doc._id, versions)
}
```
```
curl -H "Content-Type: application/json" "http://54.183.196.81:5984/npm-registry/_design/main/_view/all-versions?stale=ok&limit=1&skip=0" | jq .
```