Skip to content

Commit afc9080

Browse files
committed
Creating the Todo model with Mongoose
1 parent d3be6a2 commit afc9080

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

models/Todo.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
var mongoose = require('mongoose');
2+
3+
var TodoSchema = new mongoose.Schema({
4+
name: String,
5+
completed: Boolean,
6+
note: String
7+
});
8+
9+
module.exports = mongoose.model('Todo', TodoSchema);

0 commit comments

Comments
 (0)