api endpoints for netmeds-angular project.
- Clone this repository.
cdinto it and typenpm installon the command line to install all dependencies.- Run
npm startto start the server.
GET /employees?page=pageNo&limit=limit: Returns a paginated list of employees with given page number and limit.GET /employees:id: Returns details of a single employee having id ofid.POST /employees: Add an employee to the database.PATCH /employees/:id: Update details of employee with id ofid.GET /employees/search/:name: Returns details of all employees with names matchingname.DELETE /employees/:id: Deletes the employee with id ofidfrom the database.
NOTE
The POST and PATCH requests need a form-data body, with the following attributes:
name: string,
salary: number,
dob: Date,
skills: string[],
profilePhoto: blob (image upload)