Mongoose Model | JavaScript

March 10th, 2021 09:41:19 PM

					
const mongoose = require('mongoose') const UserSchema = new mongoose.Schema({ username: { type: String, required: true }, email: { type: String, unique: true, required: true }, password: { type: String, required: true }, date: { type: Date, default: Date.now } }) module.exports = User = mongoose.model('user', UserSchema)

Featured Posts