connect multer for file handling
Task
connect multer for file handling and to enable post request as form-data
Solution
- install all dependencies including its types
- import multer in each router
- specify directory to where files will be uploaded
- import fs as we need readFileAsync to read file and store it in database
Test
using postman send post request with form-data
Expected work time
30 minutes