README.md 851 Bytes
Newer Older
cicd's avatar
cicd committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
## Project use nodejs version 15.0.1 and mysql in XAMPP##
## Generate data base ##
####
execute query in file mysql.sql
####
## Install package ##
```npm install```
## Generate model
```npm run gen-db```
## Run unit test ##
```npm test```
## Run project ##
```npm start```
## Task 1 ##
####
use the following api:

http://localhost:3000/api/v1.0/products : for list all products

http://localhost:3000/api/v1.0/products?currentPage=1&pageSize=2: for lis list all products with paging

http://localhost:3000/api/v1.0/products: with post method for create product

http://localhost:3000/api/v1.0/products/{code}: with put method for update product 

http://localhost:3000/api/v1.0/products/p003002: with delete method for delete product by code

http://localhost:3000/api/v1.0/products?sort={name}&dir={desc/asc}: for get all product with sorting 
####