Spaces:
Paused
Paused
const mongoose = require('mongoose'); | |
// Define the schema for the User model | |
const userSchema = new mongoose.Schema({ | |
email: { | |
type: String, | |
required: true, | |
unique: true | |
}, | |
password: { | |
type: String, | |
required: true | |
} | |
}); | |
// Create the User model using the schema | |
const User = mongoose.model('User', userSchema); | |
module.exports = User; | |