This is the code we created on class #4 of NodeJS on the big screen.
cd api
npm install
npm start
- open the web/index.html in the browser
This week your homework have 2 tasks:
Clean-up your repository (from the previous homework) by splitting it into multiple modules (files) and use require/export. You can see how we did it in the class in this repo and use it as template, but avoid copy-pasting - you learn the best if you do, not copy-paste.
Add validation logic to POST /api/mentors
API endpoint - use our in class excercise as an example. Use the npm package we used in class for validation express-json-validator-middleware - you need to write schema for Mentors and use the middleware.