Skip to content

Instantly share code, notes, and snippets.

@CrisLi
Created February 9, 2015 14:19
Show Gist options
  • Save CrisLi/1211b2f3c057032919b9 to your computer and use it in GitHub Desktop.
Save CrisLi/1211b2f3c057032919b9 to your computer and use it in GitHub Desktop.
var mongoose = require('mongoose');
var TodoSchema = new mongoose.Schema({
name: String,
completed: Boolean,
note: String,
updated_at: { type: Date, default: Date.now },
});
module.exports = mongoose.model('Todo', TodoSchema);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment