Skip to content

Instantly share code, notes, and snippets.

@nomanHasan
Created September 7, 2017 19:21
Show Gist options
  • Save nomanHasan/78cbd7cfa019346830f3e46fbd463965 to your computer and use it in GitHub Desktop.
Save nomanHasan/78cbd7cfa019346830f3e46fbd463965 to your computer and use it in GitHub Desktop.
Todo Model file with Mongoose paginate
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