Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EC60F10C9E for ; Fri, 10 Jan 2014 01:11:15 +0000 (UTC) Received: (qmail 4291 invoked by uid 500); 10 Jan 2014 01:11:15 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 4249 invoked by uid 500); 10 Jan 2014 01:11:15 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 4240 invoked by uid 99); 10 Jan 2014 01:11:15 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Jan 2014 01:11:15 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 3EFBF8B4A69; Fri, 10 Jan 2014 01:11:15 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: steven@apache.org To: commits@cordova.apache.org Message-Id: <5315c02977164424bccf74e5692a7f20@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: added a basic readme Date: Fri, 10 Jan 2014 01:11:15 +0000 (UTC) Updated Branches: refs/heads/master 5b22daee1 -> e4c4e755f added a basic readme Project: http://git-wip-us.apache.org/repos/asf/cordova-registry-web/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-registry-web/commit/e4c4e755 Tree: http://git-wip-us.apache.org/repos/asf/cordova-registry-web/tree/e4c4e755 Diff: http://git-wip-us.apache.org/repos/asf/cordova-registry-web/diff/e4c4e755 Branch: refs/heads/master Commit: e4c4e755f30e109b4f6efa6cc845a6a1ad5bebac Parents: 5b22dae Author: Steven Gill Authored: Thu Jan 9 17:11:10 2014 -0800 Committer: Steven Gill Committed: Thu Jan 9 17:11:10 2014 -0800 ---------------------------------------------------------------------- README.md | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-registry-web/blob/e4c4e755/README.md ---------------------------------------------------------------------- diff --git a/README.md b/README.md new file mode 100644 index 0000000..77309f4 --- /dev/null +++ b/README.md @@ -0,0 +1,66 @@ +Install COUCHDB + +brew install couchdb + +create registry database in couch +curl -X PUT http://localhost:5984/registry + +npmjs +git clone https://github.com/imhotep/npmjs.org + +cordova registry web +git clone https://git-wip-us.apache.org/repos/asf/cordova-registry-web.git + +cd npmjs +npm install -g couchapp +npm install couchapp +npm install semver + +couchapp push registry/app.js http://localhost:5984/registry + +cd ../cordova-registry-web +couchapp push app.js http://localhost:5984/registry + +Pretty much all of the work you need to do is in cordova-registry-web + +Enter this into your terminal because legacy. +curl http://localhost:5984/registry/_design/scratch -X COPY -H destination:'_design/app' + +## Displaying on localhost + +cd /etc/apache2/users +sudo vim YOURCOMPUTERUSERNAME.conf (mine was stevengill.conf) + +Paste the following rewrite rules into it. + + + ServerName localhost + RewriteEngine on +# RewriteRule ^/downloads/(.*)$ http://cordova.iriscouch.com/downloads/$1 [P] +# RewriteRule ^/(.*)$ /registry/_design/ui/_rewrite/$1 [PT] + RewriteRule ^/((?!downloads).*)$ /registry/_design/ui/_rewrite/$1 [PT] + ProxyPassMatch ^/downloads/(.*)$ http://cordova.iriscouch.com/downloads/$1 + ProxyPassMatch ^/registry/(.*)$ http://localhost:5984/registry/$1 + RewriteLog "/var/log/apache2/plugins.cordova.io-rewrite.log" + RewriteLogLevel 3 + LogLevel debug + ErrorLog "/var/log/apache2/plugins.cordova.io-error_log" + CustomLog "/var/log/apache2/plugins.cordova.io-access_log" common + + +back to terminal, start apache with: +sudo apachectl start + +go to localhost in your browser and bam! should be working. + + +## Publish Plugins to your local instance +plugman config set registry http://localhost:5984/registry/_design/app/_rewrite + + +##Potential Errors + +If you keep seeing `POST /_session 401` when you try to publish a plugin locally, you need to go delete your user info. In terminal type `rm -rf ~/.plugman`. Then go to the plugin you want to add and go `plugman adduser`. Enter in your username, password and email. + + +