Skip to content

Instantly share code, notes, and snippets.

@joerx
Created June 7, 2014 17:18
Show Gist options
  • Save joerx/88f4ce37c1dd44399a3f to your computer and use it in GitHub Desktop.
Save joerx/88f4ce37c1dd44399a3f to your computer and use it in GitHub Desktop.
Define a mongoose model in a module on it's own.
exports = db.model('User', {
name: String
, dob: { type: Date}
, age: Number
, email_id: String
});
@joerx
Copy link
Author

joerx commented Jun 7, 2014

This is still not great since it requires a global 'db' object, so we need to work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment