initial commit

This commit is contained in:
Nuno Coração
2023-07-25 10:37:56 +01:00
parent e4a17a52bc
commit 0116c081ef
8 changed files with 1590 additions and 0 deletions

15
app/models/Todo.js Normal file
View File

@@ -0,0 +1,15 @@
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const TodoSchema = new Schema({
task: {
type: String,
required: true
},
created_at: {
type: Date,
default: Date.now()
}
});
module.exports = Todo = mongoose.model('todos', TodoSchema);