Created
December 28, 2017 21:49
-
-
Save aramkoukia/2b24a7d8dc0cf391903c37acc108d8e2 to your computer and use it in GitHub Desktop.
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'); | |
| const Schema = mongoose.Schema; | |
| const todoSchema = new Schema( | |
| { | |
| id: { type: Number, required: true, unique: true }, | |
| name: String, | |
| saying: String | |
| }, | |
| { | |
| collection: 'todoes', | |
| read: 'nearest' | |
| } | |
| ); | |
| const ToDo = mongoose.model('ToDo', todoSchema); | |
| module.exports = ToDo; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment