Skip to content

Instantly share code, notes, and snippets.

@jchris
Created November 27, 2010 15:14
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save jchris/717969 to your computer and use it in GitHub Desktop.
Save jchris/717969 to your computer and use it in GitHub Desktop.
the smallest possible CouchApp
<!DOCTYPE html>
<html>
<!-- This should be the simplest possible jQuery based CouchApp. Install by uploading to a design document in Futon or putting in _attachments/index.html and running `couchapp push` -->
<head><title>Tiny CouchApp</title></head>
<body>
<h1>Tiny CouchApp</h1>
<ul id="databases"></ul>
</body>
<script src="/_utils/script/jquery.js"></script>
<script src="/_utils/script/jquery.couch.js"></script>
<script>
$.couch.allDbs({
success : function(dbs) {
for (var i=0; i < dbs.length; i++) {
$("#databases").append('<li><a href="/_utils/database.html?'+dbs[i]+'">'+dbs[i]+'</a></li>');
};
}
});
</script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment