Skip to content

Latest commit

 

History

History
15 lines (8 loc) · 587 Bytes

README.md

File metadata and controls

15 lines (8 loc) · 587 Bytes

Exercise Tracker

This is the boilerplate for the Exercise Tracker project. Instructions for building your project can be found at https://www.freecodecamp.org/learn/apis-and-microservices/apis-and-microservices-projects/exercise-tracker

mongodb default value

This case, I used date.now as a default value.

https://mongoosejs.com/docs/defaults.html

surprising point was

Note: Mongoose only applies a default if the value of the path is strictly undefined

Important! Mongoose Default Shchema Date type = ISO 8601 string type e.g."2011-10-05T14:48:00.000Z"