Created
June 20, 2012 20:03
-
-
Save aheckmann/2961869 to your computer and use it in GitHub Desktop.
v3-comment-schema
This file contains hidden or 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
var commentSchema = new Schema({ | |
body: String | |
, user: Schema.ObjectId | |
, created: { type: Date, default: Date.now } | |
}); | |
var postSchema = new Schema({ comments: [commentSchema] }); | |
var Post = mongoose.model('Post', postSchema); |
How can I set de GMT property for default date?
How can I set de GMT property for default date?
If you're using mongo in a node.js app, you can use moment
to create such functionality.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sdfasdf