Hello,
It is me again, I have been going over mongodb and I want to say so far so good. For the life of me though I cant remember what these things are called, I tried googling but nothing comes up. Most likely, because I am not using the right word.
I will explain, the code I have right now is
const mongoose = require('mongoose');
main().catch(err => console.log(err));
async function main() {
await mongoose.connect('mongodb://localhost:27017/courses')
.then(()=> console.log('Connected to MongoDB...'))
.catch((err) => console.error('Could not connect to MongoDB...', err));
}
const studentSchema = new mongoose.Schema({
name: String,
password: String,
email: {
type: String,
trim: true,
lowercase: true,
}
});
I am making a student schema, and then a course schema. I am going through the email right now, and the code that says
trim:true
I for the life of me can not remember what that “trim” would be called. A property? attribute? I am just wondering because I want to look at a full list for other things I should add for that email