summaryrefslogtreecommitdiff
path: root/models/user.js
diff options
context:
space:
mode:
Diffstat (limited to 'models/user.js')
-rw-r--r--models/user.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/models/user.js b/models/user.js
new file mode 100644
index 0000000..a38cf67
--- /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);