Skip to content

Instantly share code, notes, and snippets.

@miyamotodev123
Created November 30, 2015 01:45
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 miyamotodev123/e707a2fbe2b59d44ac1e to your computer and use it in GitHub Desktop.
Save miyamotodev123/e707a2fbe2b59d44ac1e to your computer and use it in GitHub Desktop.
passport tdd blog user.js
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