Skip to content

Instantly share code, notes, and snippets.

@janpieper
Created February 17, 2011 23:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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: "max@mustermann.de"
}, function(err, doc) {
console.log(doc);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment