Task Flow API
REST task API where each JWT is stored on the user document, so logging out deletes it.
- Node.js
- Express
- MongoDB
- JWT
- JavaScript
The hard part
Profile pictures were the awkward part of a JSON-only API. Multer holds the upload in memory, capped at 1 MB and png/jpeg/jpg only, then sharp resizes it to a 250x250 PNG and the bytes go into the user document as a Buffer. GET /users/me/avatar streams it back as image/png instead of JSON.