Created
September 25, 2019 11:24
-
-
Save da7a90/75bf2859da4d6330890246981c1015c9 to your computer and use it in GitHub Desktop.
User model for simple NodeJS authentication
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
const mongoose = require('mongoose'); | |
var userSchema = mongoose.Schema({ | |
email : String, | |
password : String, | |
role : String | |
}); | |
var User = mongoose.model('User', userSchema); | |
module.exports = User; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment