couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Ramage <>
Subject Re: HTML documentation within a couch application
Date Thu, 27 Sep 2012 20:13:52 GMT
Ok, there are some simple things to do, and some dragons here.

1. Add and use rewrites. Here are the basics:
2. Now when you push your app, access it at
3. Use relative urls for all your resources.
4. when using ajax to access your couch via a the rewrites (and make
it relative) so  like

5. Now if you want your couchapp to be the root of MY.HOST.NAME then
add to the vhost section of the configuration. An entry like:

[vhosts] = /mydb/_design/whatever/_rewrite/

6. This part is cheating. It should not be allowed, but it is so abuse
at your leisure. If you want your couchapp at then
add a vhost like such:

[vhosts] = /mydb/_design/whatever/_rewrite/

So in all cases you should not need to add anywhere in
the html. Keeps it nice and portable.

PS. Dragons are in show and list functions. You can pretty much follow
the advice from above for these. But you cant distinguish if your app
is running under case 5 or 6. See

View raw message