Today I gained my API and Microservices certificate!
Frameworks and tools I used
- MongoDB Atlas
- Mongoose
- Express
- multer
- body parser
Patterns I learnt
- The callback patterns of Express
- Scheme - Model - Query of mongoose
Challenges I met
- Manually implement auto-increment in MongoDB
- Validating a JavaScript
Date
object. Ifnew Date()
is passed with an invalid argument, the output is anInvalid Date
object which is also an instance ofDate
. The invalid date could be identified throughisNaN(invalidDate)
. - Chaining queries. The user could choose whether they want to add a
from
andto
filter into their query, as well as alimit
field. See here for what I did for the GET router'/api/exercise/log?[userId]&{from}&{to}&{limit}'
. - Handling file uploads with Express multer middleware