Skip to content

Instantly share code, notes, and snippets.

@dhodgin
dhodgin / user.js
Last active December 26, 2015 22:49
Sample Mongoose Schema for a user
// Sample Mongoose User Schema with a schema plugin
var mongoose = require("mongoose")
, Schema = mongoose.Schema
, lastModified = require("./plugins/lastModified")
, Validator = require("./validator").Validator
, validator = new Validator()
, User;
// define the schema