Wiki

Clone wiki

gnd / Installing a CouchApp

To install couchapp on any couchdb server, here is what you need to do -

  1. Get Couchapp setup and install.

  2. Run couchapp generate myapp(you can choose have your own application name here, for now lets just say myapp) to generate a directory structure for your app.

  3. Remove everything under myapp/_attachments.

  4. Copy everything except WEB-INF from your war folder to "myapp/_attachments" Since we are deploying our GWT app, we will need to compile it first, easiest way is to use GWT plugin from the toolbar in eclipse to compile the application, so compile javascripts/css/html are copied under war folder, and copy everything except WEB-INF from your war folder to "myapp/_attachments."

  5. To push the app to the local/remote couchdb with authentication, call -

#!cmd

couchapp push http://$username:$password@gnd.iriscouch.com/tracks
where $username is your username and $password is your password for the couchdb, incase if it doesn't require authenticaation simply call

#!cmd

couchapp push http://gnd.iriscouch.com/tracks

Application should be deployed under design documents of the database, navigate to the documents click on the html file and you will be taken to the application. The url in our case looks like -

http://gnd.iriscouch.com/tracks/_design/myapp/gwtp_gnd.html

and the design document is listed at

http://gnd.iriscouch.com/_utils/document.html?tracks/_design/myapp

Updated