Created
November 27, 2010 15:14
-
-
Save jchris/717969 to your computer and use it in GitHub Desktop.
the smallest possible CouchApp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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