Created
January 19, 2015 18:53
-
-
Save hunterc/b4c19e8c57f47125ddaf to your computer and use it in GitHub Desktop.
example mongoose model
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
var mongoose = require('mongoose'), | |
Schema = mongoose.Schema; | |
var fields = { | |
// fields for model | |
name: String | |
}; | |
var ModelSchema = new Schema(fields); | |
module.exports = mongoose.model('ModelName', ModelSchema); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment