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. If new Date() is passed with an invalid argument, the output is an Invalid Date object which is also an instance of Date. The invalid date could be identified through isNaN(invalidDate).
  • Chaining queries. The user could choose whether they want to add a from and to filter into their query, as well as a limit 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