Skip to content

Instantly share code, notes, and snippets.

@CreaturePhil
Created February 17, 2015 01:09
Show Gist options
  • Save CreaturePhil/62dbaa11bd45dd92dfbb to your computer and use it in GitHub Desktop.
Save CreaturePhil/62dbaa11bd45dd92dfbb to your computer and use it in GitHub Desktop.
var mongoose = require('mongoose');
var postSchema = mongoose.Schema({
title: { type: String, required: true },
text: { type: String, required: true },
date: { type: Date, required: true }
});
var post = mongoose.model('post', postSchema);
module.exports = post;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment