i gave notice today, had an awesome interview, i did a workout today and had a guitar lesson and am now doing a wesbos class. go me!


I am at class 32 and today’s modules have been:

  1. Email and Permissions (email and permissions - adding owners to things and conditionally displaying based on role)
  2. AJAX Rest API (ajax hardmode…)

nonobvious things to note:

  • using pug to render html email
  • using juice to inline css
  • using htmlToText to do what it says on the tin
  • setting document owners with type: mongoose.Schema.ObjectId, and the free lookup with .findOne().populate('author')
  • setting text indexes and sorting find operations by $meta: 'textScore' in mongo
  • sanitizing using dompurify.sanitize