Instantly share code, notes, and snippets.

Embed
What would you like to do?
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var Article = new Schema({
title: String,
content: String,
created_at: {
type: Date,
default: Date.now
},
last_modified_at: {
type: Date,
default: Date.now
}
});
module.exports = mongoose.model('Article', Article);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment