Created
August 29, 2012 23:25
-
-
Save pegli/3520302 to your computer and use it in GitHub Desktop.
using couch_client.js
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
var client = require('couch_client').CouchClient('http://foo.iriscouch.com'); | |
var db = client.database('mydb'); | |
db.create(); // if not already created | |
var document = { | |
x: 10, | |
y: 'some string', | |
foo: [1, 2, 3] | |
}; | |
db.save(document, function(response, status)) { | |
Ti.API.info(JSON.stringify(response)); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment