Skip to content

Instantly share code, notes, and snippets.

Created December 22, 2012 22:36
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 anonymous/4361573 to your computer and use it in GitHub Desktop.
Save anonymous/4361573 to your computer and use it in GitHub Desktop.
var mongoose = require('mongoose');
mongoose.connect('mongodb://nodejitsu:mypass@linus.mongohq.com:10085/champagne-dev');
var schema = mongoose.Schema({ name: 'string' });
var Cat = mongoose.model('Cat', schema);
var kitty = new Cat({ name: 'Zildjian' });
kitty.save(function (err) {
if (err) console.log(err);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment