I have the following in server.js:
var mongoose = require('mongoose'), Schema = mongoose.Schema;
and a model that works great!
var userSchema = new Schema({ firstName: { type: String, trim: true, required: true }, lastName: {type: String, trim: true, required: true}, cellPhoneNumber : {type: Number, unique: true}, email: { type: String, unique: true, lowercase: true, trim: true }, password: String });
and there is another model similar below that doesn't work!
var jobSchema = new Schema({ category: {type: Number, required: true}, title: {type: String, required: true}, tags: [String], longDesc: String, startedDate: Date, views: Number, report: Boolean, reportCounter: Number, status: String, poster: String, lastModifiedInDate: Date, verified: Boolean });
The two var are as follows:
var User = mongoose.model('User', userSchema); var Job = mongoose.model('Job', jobSchema);
- mongod does not register any errors after connecting to server.js server. Does anyone know what happened to my second model?