Created
September 7, 2017 19:21
-
-
Save nomanHasan/78cbd7cfa019346830f3e46fbd463965 to your computer and use it in GitHub Desktop.
Todo Model file with Mongoose paginate
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
var mongoose = require('mongoose') | |
var mongoosePaginate = require('mongoose-paginate') | |
var ToDoSchema = new mongoose.Schema({ | |
title: String, | |
description: String, | |
date: Date, | |
status: String | |
}) | |
ToDoSchema.plugin(mongoosePaginate) | |
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