first commit

This commit is contained in:
Daniel
2023-02-02 00:43:27 +02:00
commit 679d857570
29 changed files with 3540 additions and 0 deletions

16
models/taskModel.js Normal file
View File

@@ -0,0 +1,16 @@
const mongoose = require('mongoose')
const taskSchema = new mongoose.Schema({
name: {
type: String,
required: [true, "Must provide text!"],
trim: true,
maxlength: [50, "Not longer than 50 characters!"]
},
completed: {
type: Boolean,
default: false
}
})
module.exports = mongoose.model('Task', taskSchema)