From 5a1722ce8b19c587019afd2e3cc22896d1d6a98f Mon Sep 17 00:00:00 2001 From: Richard Mitchell Date: Wed, 27 Feb 2013 14:55:09 +0000 Subject: [PATCH 1/6] Add documentation on running your own repository --- README.md | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/README.md b/README.md index 265f01e..79685af 100644 --- a/README.md +++ b/README.md @@ -125,6 +125,8 @@ exports.repositories = [ ]; ``` +See the section below on running your own repository. + ### package\_dir @@ -164,6 +166,64 @@ You can then run the integration tests using `test/integration.sh` or `test/all.sh` or `test\all.bat`. +## Running your own private repository or mirror +1. Install couchdb + + Mac OS X: + 1. Install [Homebrew](http://mxcl.github.com/homebrew/). + 2. +``` +brew install couchdb +``` + + Ubuntu: +``` +apt-get install couchdb +``` + +2. Configure your database + + To create a mirror: +``` +curl -X POST http://127.0.0.1:5984/_replicate -d '{"source":"http://jamjs.org/repository", "target":"repository", "continuous":true, "create_target":true}' -H "Content-Type: application/json" +``` + + To create an empty, private repository: +``` +curl -X PUT http://127.0.0.1:5984/repository +``` + +3. Edit your ```.jamrc``` file to use your new repository: + +``` +exports.repositories = [ + { + url: "http://localhost:5984/repository", + search: false + }, + "http://jamjs.org/repository" +]; +``` + +### Adding search + +1. [Install couchdb-lucene](https://github.com/rnewson/couchdb-lucene#build-and-run-couchdb-lucene) + +2. Edit your ```.jamrc``` file to allow searching on your repository: + +``` +exports.repositories = [ + "http://localhost:5984/repository", + "http://jamjs.org/repository" +]; +``` + +### Publishing packages to your private repository + +``` +jam publish --repository http://localhost:5984/repository +``` + ## More documentation To learn how to create and publish packages etc, and for more info on using From a66e487b3fe458a0201231dc41091b17fa995a1b Mon Sep 17 00:00:00 2001 From: Richard Mitchell Date: Wed, 27 Feb 2013 15:07:08 +0000 Subject: [PATCH 2/6] Update README.md --- README.md | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 79685af..05a5b47 100644 --- a/README.md +++ b/README.md @@ -168,33 +168,26 @@ You can then run the integration tests using `test/integration.sh` or ## Running your own private repository or mirror 1. Install couchdb - - Mac OS X: + #### Mac OS X: 1. Install [Homebrew](http://mxcl.github.com/homebrew/). 2. ``` brew install couchdb ``` - - Ubuntu: + #### Ubuntu: ``` apt-get install couchdb ``` - 2. Configure your database - - To create a mirror: + #### To create a mirror: ``` curl -X POST http://127.0.0.1:5984/_replicate -d '{"source":"http://jamjs.org/repository", "target":"repository", "continuous":true, "create_target":true}' -H "Content-Type: application/json" ``` - - To create an empty, private repository: + #### To create an empty, private repository: ``` curl -X PUT http://127.0.0.1:5984/repository ``` - 3. Edit your ```.jamrc``` file to use your new repository: - ``` exports.repositories = [ { @@ -208,9 +201,8 @@ exports.repositories = [ ### Adding search 1. [Install couchdb-lucene](https://github.com/rnewson/couchdb-lucene#build-and-run-couchdb-lucene) - -2. Edit your ```.jamrc``` file to allow searching on your repository: - +2. Restart couchdb. +3. Edit your ```.jamrc``` file to allow searching on your repository: ``` exports.repositories = [ "http://localhost:5984/repository", From 3db6b1ebeafa293e9762c40470076f539a000a84 Mon Sep 17 00:00:00 2001 From: Richard Mitchell Date: Wed, 27 Feb 2013 15:08:23 +0000 Subject: [PATCH 3/6] Update README.md --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 05a5b47..2dd573f 100644 --- a/README.md +++ b/README.md @@ -168,26 +168,37 @@ You can then run the integration tests using `test/integration.sh` or ## Running your own private repository or mirror 1. Install couchdb + #### Mac OS X: + 1. Install [Homebrew](http://mxcl.github.com/homebrew/). 2. + ``` brew install couchdb ``` + #### Ubuntu: + ``` apt-get install couchdb ``` 2. Configure your database + #### To create a mirror: + ``` curl -X POST http://127.0.0.1:5984/_replicate -d '{"source":"http://jamjs.org/repository", "target":"repository", "continuous":true, "create_target":true}' -H "Content-Type: application/json" ``` + #### To create an empty, private repository: + ``` curl -X PUT http://127.0.0.1:5984/repository ``` + 3. Edit your ```.jamrc``` file to use your new repository: + ``` exports.repositories = [ { @@ -202,7 +213,8 @@ exports.repositories = [ 1. [Install couchdb-lucene](https://github.com/rnewson/couchdb-lucene#build-and-run-couchdb-lucene) 2. Restart couchdb. -3. Edit your ```.jamrc``` file to allow searching on your repository: +3. Edit your ```.jamrc``` file to allow searching on your repository: + ``` exports.repositories = [ "http://localhost:5984/repository", From 2e3010a6f0c58e1728fe636253eb07063ad5f615 Mon Sep 17 00:00:00 2001 From: Richard Mitchell Date: Wed, 27 Feb 2013 15:09:16 +0000 Subject: [PATCH 4/6] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2dd573f..a0c12cf 100644 --- a/README.md +++ b/README.md @@ -169,7 +169,7 @@ You can then run the integration tests using `test/integration.sh` or ## Running your own private repository or mirror 1. Install couchdb - #### Mac OS X: +#### Mac OS X: 1. Install [Homebrew](http://mxcl.github.com/homebrew/). 2. @@ -178,20 +178,20 @@ You can then run the integration tests using `test/integration.sh` or brew install couchdb ``` - #### Ubuntu: +#### Ubuntu: ``` apt-get install couchdb ``` 2. Configure your database - #### To create a mirror: +#### To create a mirror: ``` curl -X POST http://127.0.0.1:5984/_replicate -d '{"source":"http://jamjs.org/repository", "target":"repository", "continuous":true, "create_target":true}' -H "Content-Type: application/json" ``` - #### To create an empty, private repository: +#### To create an empty, private repository: ``` curl -X PUT http://127.0.0.1:5984/repository From 5f05f2cc960e1d02a64ed8d37831783e0865ae82 Mon Sep 17 00:00:00 2001 From: Richard Mitchell Date: Wed, 27 Feb 2013 15:10:12 +0000 Subject: [PATCH 5/6] I suck at Markdown --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index a0c12cf..1998f8f 100644 --- a/README.md +++ b/README.md @@ -168,37 +168,37 @@ You can then run the integration tests using `test/integration.sh` or ## Running your own private repository or mirror 1. Install couchdb - + #### Mac OS X: - + 1. Install [Homebrew](http://mxcl.github.com/homebrew/). 2. - + ``` brew install couchdb ``` #### Ubuntu: - + ``` apt-get install couchdb ``` 2. Configure your database - + #### To create a mirror: - + ``` curl -X POST http://127.0.0.1:5984/_replicate -d '{"source":"http://jamjs.org/repository", "target":"repository", "continuous":true, "create_target":true}' -H "Content-Type: application/json" ``` - + #### To create an empty, private repository: - + ``` curl -X PUT http://127.0.0.1:5984/repository ``` 3. Edit your ```.jamrc``` file to use your new repository: - + ``` exports.repositories = [ { From 4fb6187d595179519555422a70a295ef28996280 Mon Sep 17 00:00:00 2001 From: Richard Mitchell Date: Wed, 27 Feb 2013 15:37:54 +0000 Subject: [PATCH 6/6] Fix searching. Need design documents. --- README.md | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1998f8f..e971c52 100644 --- a/README.md +++ b/README.md @@ -185,10 +185,24 @@ apt-get install couchdb ``` 2. Configure your database +``` +curl -X POST http://127.0.0.1:5984/_replicate -d '{ + "source":"http://jamjs.org/repository", + "target":"http://localhost:5984/repository", + "continuous":true, + "doc_ids":["_design/jam-packages"] + }' -H "Content-Type: application/json" +``` + #### To create a mirror: ``` -curl -X POST http://127.0.0.1:5984/_replicate -d '{"source":"http://jamjs.org/repository", "target":"repository", "continuous":true, "create_target":true}' -H "Content-Type: application/json" +curl -X POST http://127.0.0.1:5984/_replicate -d '{ + "source":"http://jamjs.org/repository", + "target":"repository", + "continuous":true, + "create_target":true + }' -H "Content-Type: application/json" ``` #### To create an empty, private repository: @@ -217,7 +231,10 @@ exports.repositories = [ ``` exports.repositories = [ - "http://localhost:5984/repository", + { + url: "http://localhost:5984/repository", + search: "http://localhost:5984/_fti/local/repository/_design/jam-packages/packages/" + }, "http://jamjs.org/repository" ]; ```