Skip to content

Instantly share code, notes, and snippets.

/testmodified.js
Created Dec 22, 2012

Embed
What would you like to do?
var mongoose = require('mongoose');
var opts = { server: { auto_reconnect: false }, user: 'nodejitsu', pass: 'mypass' }
mongoose.connect('linus.mongohq.com:10085/champagne-dev', opts);
//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
You can’t perform that action at this time.