Skip to content

Instantly share code, notes, and snippets.

@da7a90
Created September 25, 2019 11:24
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 da7a90/75bf2859da4d6330890246981c1015c9 to your computer and use it in GitHub Desktop.
Save da7a90/75bf2859da4d6330890246981c1015c9 to your computer and use it in GitHub Desktop.
User model for simple NodeJS authentication
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