-
-
Save amandeepmittal/4ef1eda779c0fbf29bc66af46e17905f to your computer and use it in GitHub Desktop.
This file contains 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
// Books.js | |
const mongoose = require('mongoose'); | |
const Schema = mongoose.Schema; | |
const bookSchema = new Schema({ | |
title: { | |
type: String, | |
required: true | |
}, | |
author: { | |
type: String, | |
required: true | |
} | |
}); | |
const Book = mongoose.model('Book', bookSchema); | |
module.exports = Book; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment