Skip to content

Instantly share code, notes, and snippets.

@jchris
Created November 27, 2010 15:14
Show Gist options
  • 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