Skip to content

Instantly share code, notes, and snippets.

@janpieper
Created February 17, 2011 23:11
Show Gist options
  • Save janpieper/832950 to your computer and use it in GitHub Desktop.
Save janpieper/832950 to your computer and use it in GitHub Desktop.
var resourcer = require("resourcer");
resourcer.connect({
port: 5984,
uri: "database://website"
});
exports.Account = resourcer.define("account", function() {
this.property("type");
this.property("name");
this.property("email");
});
Account.create({
type: "account",
name: "Max Mustermann",
email: "[email protected]"
}, function(err, doc) {
console.log(doc);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment