radoslaw-medryk / hyf-class09-04

Code written on class #4 of NodeJs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hyf-class09-04

This is the code we created on class #4 of NodeJS on the big screen.

How to start:

  • cd api
  • npm install
  • npm start
  • open the web/index.html in the browser

Homework

This week your homework have 2 tasks:

Task 1:

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.

Task 2:

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.

About

Code written on class #4 of NodeJs


Languages

Language:JavaScript 87.8%Language:HTML 12.2%