QA/Mozmill Test Automation/Dashboard/FAQ: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
= Publishing = | = Publishing = | ||
===Which tools are necessary to push a Sammy application to a couchdb database?=== | |||
To be able to push a Sammy application to a Couchdb instance, the following tools have to be installed: | To be able to push a Sammy application to a Couchdb instance, the following tools have to be installed: | ||
Line 9: | Line 8: | ||
#[https://github.com/mikeal/node.couchapp.js node-couchapp] (Follow the steps below) | #[https://github.com/mikeal/node.couchapp.js node-couchapp] (Follow the steps below) | ||
<blockquote><pre>$ npm install couchapp</pre> </blockquote> | <blockquote><pre>$ npm install couchapp</pre> </blockquote> | ||
===How do I push a Sammy application to a Couchdb?=== | |||
Pushing a Sammy application to a Couchdb database can be done in one step. To know which command line options are supported run the following snippet: | Pushing a Sammy application to a Couchdb database can be done in one step. To know which command line options are supported run the following snippet: | ||
<blockquote><pre>$ couchapp help | <blockquote><pre>$ couchapp help | ||
Line 23: | Line 22: | ||
If the database has been protected by an admin and login credentials are necessary to push a design document, use the "''user:password@''" prefix in-front of the hostname.<br> | If the database has been protected by an admin and login credentials are necessary to push a design document, use the "''user:password@''" prefix in-front of the hostname.<br> | ||
===Can node.couchapp automatically sync results with a database?=== | |||
Yes, that is possible. Simply add the ''"--sync"'' option when pushing a design document to the database. The application will not exit, but each change to the design document will be detected and synced immediately. There is no need to run this command multiple times. The only execption is when couchdb views have to be updated. In such a case the application has to be restarted.<br> | Yes, that is possible. Simply add the ''"--sync"'' option when pushing a design document to the database. The application will not exit, but each change to the design document will be detected and synced immediately. There is no need to run this command multiple times. The only execption is when couchdb views have to be updated. In such a case the application has to be restarted.<br> |
Revision as of 23:53, 28 January 2011
Publishing
Which tools are necessary to push a Sammy application to a couchdb database?
To be able to push a Sammy application to a Couchdb instance, the following tools have to be installed:
- Node.js (Follow the instructions)
- Node package manager (Follow the instructions)
- node-couchapp (Follow the steps below)
$ npm install couchapp
How do I push a Sammy application to a Couchdb?
Pushing a Sammy application to a Couchdb database can be done in one step. To know which command line options are supported run the following snippet:
$ couchapp help -d, --design :: File or directory for design document(s) -t, --test :: Run tests. -s, --sync :: Sync with CouchDB. -c, --couch :: Url to couchdb.
The two options which are important are --design, and --couch. That means, uploading the design document with the name "dashboard.js" to the Couchdb database "mozmill" on localhost needs:
$ couchapp --design dashboard.js --couch http://localhost:5984/mozmill/
If the database has been protected by an admin and login credentials are necessary to push a design document, use the "user:password@" prefix in-front of the hostname.
Can node.couchapp automatically sync results with a database?
Yes, that is possible. Simply add the "--sync" option when pushing a design document to the database. The application will not exit, but each change to the design document will be detected and synced immediately. There is no need to run this command multiple times. The only execption is when couchdb views have to be updated. In such a case the application has to be restarted.