Created
October 11, 2012 04:20
-
-
Save asalant/3870139 to your computer and use it in GitHub Desktop.
Ubiquitous JS example: Mongoose User
This file contains hidden or 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
| mongoose = require 'mongoose' | |
| UserMixin = require '../../shared/user_mixins' | |
| schema = new mongoose.Schema | |
| email: { type: String, lowercase: true, required: true, unique: true } | |
| name: { type: String, required: true } | |
| passwordHash: { type: String } | |
| User = mongoose.model('User', schema) | |
| UserMixin(User) | |
| module.exports = User |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment