- download/clone the repo
- cd to the main directory
- run $ npm install
- run $ node server
- name: string
- imageUrl: string
- GET:
/api/users
- explanation: get all users documents
- GET:
/api/materials/:UID
(e.g. GET: /api/materials/120)- explanation: get the document of a user specified by UID.
- POST:
/api/users
- explanation: create a new material, mainly for admin
- content-type should be multupart/form-data
- payload: 1. name: the name of the new user; 2. file: the image file of the new user
- PUT:
/api/users/:UID
- explanation: update the info of the user specified by UID
- payload is the new key-value pairs you want to update to.
- DELETE:
/api/users/:UID
- explanation: delete the user specified by UID