Created
November 30, 2015 01:45
-
-
Save miyamotodev123/e707a2fbe2b59d44ac1e to your computer and use it in GitHub Desktop.
passport tdd blog user.js
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'); | |
var userSchema = mongoose.Schema({ | |
username: { | |
type: String, | |
required: true, | |
index: {unique: true} | |
}, | |
password: { | |
type: String, | |
required: true, | |
} | |
}); | |
module.exports = mongoose.model('User', userSchema); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment