Created
June 7, 2014 17:18
-
-
Save joerx/88f4ce37c1dd44399a3f to your computer and use it in GitHub Desktop.
Define a mongoose model in a module on it's own.
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
exports = db.model('User', { | |
name: String | |
, dob: { type: Date} | |
, age: Number | |
, email_id: String | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is still not great since it requires a global 'db' object, so we need to work on this.