-
-
Save ManishPoduval/a490ab0d6617b9504cf7826e4a638b91 to your computer and use it in GitHub Desktop.
Create this inside your models folder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mongoose = require('mongoose'); | |
let TodoSchema = new mongoose.Schema({ | |
name: String, | |
description: String, | |
completed: Boolean, | |
}) | |
let TodoModel = mongoose.model('todo', TodoSchema) | |
module.exports = TodoModel; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment