From 376fae2a3367d5813d088a29c5a62938bd55f762 Mon Sep 17 00:00:00 2001 From: Mateja Date: Thu, 6 May 2021 21:07:24 +0200 Subject: Boilerplate for login system. --- models/user.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 models/user.js (limited to 'models') diff --git a/models/user.js b/models/user.js new file mode 100644 index 0000000..32b0540 --- /dev/null +++ b/models/user.js @@ -0,0 +1,12 @@ +const mongoose = require('mongoose'); + +const userSchema = new mongoose.Schema({ + firstname: {type: String, required: true}, + lastname: {type: String, required: true}, + email: {type: String, required: true}, + password: {type: String, required: true}, +}); + +const userModel = new mongoose.Model('user', userSchema); + +module.exports = userModel; -- cgit v1.2.3