This repo use for mentoring nodejs and reactjs integration api training
npm i -g sequelize-cli
- clone this project and move to project directory
- install all the dependencies required:
npm install or yarn install
- Create
.env
file (copy.env.example
and fill it) - Create
config.json
onconfig/
directory (copyconfig.json.example
and fill it) - Use the sequelize-cli command for database migration :
npx sequelize-cli db:migrate
- Run this Project
npm start or yarn start
- Finish
GET /api/users
Query Parameter | Type | Description |
---|---|---|
page |
integer |
page of data |
search |
string |
search data by email or firstName |
sortBy |
string |
sortBy email or firstName |
sort |
string |
sort ASC or DESC |
GET /api/users/${uuid}
Parameter | Type | Description |
---|---|---|
uuid |
string |
Required. uuid of user to fetch |
POST /api/users
Body Parameter | Type | Description |
---|---|---|
firstName |
string |
Required. firstName of store user |
lastName |
string |
Required. lastName of store user |
email |
string |
Required. email of store user |
address |
string |
Required. address of store user |
phone |
integer |
Required. phone of store user |
PUT /api/users/${uuid}
Parameter | Body Parameter | Type | Description |
---|---|---|---|
uuid |
- | string |
Required. uuid for find user |
- | firstName |
string |
Optional. firstName of store user |
- | lastName |
string |
Optional. lastName of store user |
- | email |
string |
Optional. email of store user |
- | address |
string |
Optional. address of store user |
- | phone |
integer |
Optional. phone of store user |
DELETE /api/users/${uuid}
Parameter | Body Parameter | Type | Description |
---|---|---|---|
uuid |
- | string |
Required. uuid for find user |