Mongoose Boolean default false
Looks like you are missing something. setting default: false
for that field will auto set it to false.
const mongoose = require('mongoose');
const projectSchema = new mongoose.Schema({
isUsed: {
type: Boolean,
default: false
}
});
mongoose.model('Project', projectSchema, 'project');