diff options
author | BakedSnake <gilferrandm@gmail.com> | 2021-03-17 12:58:53 +0100 |
---|---|---|
committer | BakedSnake <gilferrandm@gmail.com> | 2021-03-17 12:58:53 +0100 |
commit | 188527c6b55a2d64d5f76c5d3e094da45c69b0c9 (patch) | |
tree | 8c6c41a2ffe04af81483ec36f72d328c3c76780a /models/user.js |
Diffstat (limited to 'models/user.js')
-rw-r--r-- | models/user.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/models/user.js b/models/user.js new file mode 100644 index 0000000..49dedf0 --- /dev/null +++ b/models/user.js @@ -0,0 +1,11 @@ +const mongoose = require("mongoose"), + passportLocalMongoose = require("passport-local-mongoose"); + +const UserSchema = new mongoose.Schema({ + username: String, + password: String, +}); + +UserSchema.plugin(passportLocalMongoose); + +module.exports = mongoose.model("User", UserSchema);
\ No newline at end of file |