Skip to content

Instantly share code, notes, and snippets.

@hunterc
Created January 19, 2015 18:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hunterc/b4c19e8c57f47125ddaf to your computer and use it in GitHub Desktop.
Save hunterc/b4c19e8c57f47125ddaf to your computer and use it in GitHub Desktop.
example mongoose model
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