Skip to content

Instantly share code, notes, and snippets.

@karmi
Forked from jchris/couchapp.html
Created November 27, 2010 16:47
Show Gist options
  • Save karmi/718054 to your computer and use it in GitHub Desktop.
Save karmi/718054 to your computer and use it in GitHub Desktop.
<!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