Sun Jan 14 2024 14:56:45 GMT+0000 (Coordinated Universal Time)
Saved by @Hritujeet
import mongoose from 'mongoose'; const { Schema } = mongoose; const BlogSchema = new Schema({ title: String, // String is shorthand for {type: String} author: String, body: String, isDone:Boolean }); export const Blog = mongoose.model('Todo', BlogSchema)
Copy this HTML code:
Preview:
open_in_newInstructions on embedding in Medium
Comments