Hi,
I am really at the beginning. I would like to use the couch.js at the client
site. Couch.js defines the CouchDB. But I did not find anything that specify
the host information. How do you specify the server host information?
Here is a simple thing I want to test first:
I want to use the couch.js. First connect to the server, then create a
database, then insert some doc.
<script type="text/javascript">
function testCouchDB()
{
CouchDB.host = "127.0.0.1:5984"; // I know this is wrong, but how
do I do that?
var db = new CouchDB("test", {"X-Couch-Full-Commit":"false"});
db.createDb();
var nc = {_id:"NC", cities:["Charlotte", "Raleigh"]};
var ma = {_id:"MA", cities:["Boston", "Lowell", "Worcester",
"Cambridge", "Springfield"]};
var fl = {_id:"FL", cities:["Miami", "Tampa", "Orlando",
"Springfield"]};
db.save(nc);
db.save(ma);
db.save(fl);
}
</script>
Shaolong Wu
System Analyst III
BCB Programming Service
Division of Quantitative Sciences
University of Texas MD Anderson Cancer Center
713-792-2604