Skip to content

Instantly share code, notes, and snippets.

@ianaya89
Last active December 22, 2016 14:28
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 ianaya89/c77c418d2ba78f10e83d0e3263c8fb63 to your computer and use it in GitHub Desktop.
Save ianaya89/c77c418d2ba78f10e83d0e3263c8fb63 to your computer and use it in GitHub Desktop.
const catSchema = mongoose.Schema({
name: String
});
const Cat = mongoose.model('Cat', catSchema);
Cat.find({}, (err, cats) => {
if (err) { return console.error(err); }
console.log(cats);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment