var mongoose = require('mongoose');
var Assignment = new mongoose.Schema({
  due: {
    type: Date,
    required: true
  },
  description: {
    type: String
  },
  posted: {
    type: Number,
    required: true
  }
});
mongoose.model('Assignment', Assignment);

module.exports = Assignment;

var mongoose = require('mongoose');
var Assignment = new mongoose.Schema({
  due: {
    type: Number,
    required: true
  },
  description: {
    type: String
  },
  posted: {
    type: Number,
    required: true
  }
});
mongoose.model('Assignment', Assignment);

module.exports = Assignment;

Move from Date to Number