tsotnekekelia / wad20-exam-c

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WAD 2020 Exam: Project C

Project setup

npm install

Compiles for development

npm start

Setup

Fork this project!

Make sure that your newly created project is private and only you and me have access to it, otherwise tasks will not be graded.

To see how to change repository visibility to private and add collaborators click here and here

My email and username on github is: cotne.kekelia@yahoo.com and tsotnekekelia

Tasks

Modify users.js

  • Add a new POST route localhost:3000/users/search/:property, where property is a rout path parameter and represents one of the properties of the user object property can be: id, firstname, lastname, email, avatar, occupation
  • In POST request body your endpoint will receive an object { keyword: "text" }
  • Endpoint should read local users.js file and return only those user objects where property (passed in route path) value contains text passed in the POST request body, if no matches found return empty response with status code 404

For example:

screenshot1 screenshot2 screenshot3 screenshot4

About


Languages

Language:JavaScript 93.0%Language:HTML 4.3%Language:CSS 2.7%