Last active
October 28, 2015 19:48
-
-
Save devalexandre/a9dfc651d5f57c0535fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// grab the things we need | |
var mongoose = require('mongoose'); | |
var Schema = mongoose.Schema; | |
var postSchema = new Schema({ | |
title : {type:String, required:true}, | |
content : {type:String, required:true}, | |
categories:{ | |
name: {type:String, required:true}, | |
} | |
}); | |
var Post = mongoose.model('Post', postSchema); | |
// make this available to our users in our Node applications | |
module.exports = Post; |
Pompeu
commented
Oct 28, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment