couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wu,Shaolong" <>
Subject Any Javascript example for conenction to the couchDB server
Date Tue, 02 Mar 2010 19:55:44 GMT

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()

   = ""; // I know this is wrong, but how do I do that?

            var db = new CouchDB("test", {"X-Couch-Full-Commit":"false"});


            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"]};



Shaolong Wu

System Analyst III
BCB Programming Service
Division of Quantitative Sciences
University of Texas MD Anderson Cancer Center

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message