Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
# Backend
## install project dependencies
```
cd server
npm install
or yarn install
```
## run project
```
cd server
npm run dev
or yarn dev
```
> terminal console http://127.0.0.1:4900/api and Connected to mongodb success, backend run success
# Fronend
## install project dependencies
```
cd client
npm install
or yarn install
```
## run project
```
cd client
npm run start
or yarn start
```
> terminal console Local: http://localhost:3000 , fronend run success
### Pack Project
```
cd client
npm run build
or yarn build
```
# API list
## User
| method | api | desc |
|--- | --|--|
| post| api/user/signup| user signup|
| post | api/user/signin| user signin|
## Book
| method | api | params | desc |
|--- | --|--| -- |
|get | api/book/search | keyword,page,size | get book list |
|get | api/book/my | | my book list |
|get | api/book/:id | id | get book detail |
|post | api/book/ | category,ISBN,file,book_name,price,author,describe | add book |
|delete | api/book/:id | id | delete book |
|put | api/book/:id | id | update book |
| | | |
## Category
| method | api | params| desc |
|--- | --|--| -- |
|get | api/category/ | | get category list |
|get | api/category/all | | get category all list |
|post | api/category/ | name | add category |
|put | api/category/:id | id, name | update category name, state |
| | | |
## Borrow
| method | api |params| desc |
|--- | -- | --|--|
| post | api/borrow/ | book information and user information | add borrow record |
| delete | api/borrow/:id | id | delete borrow by id |
| get | api/borrow/my | | get borrow list |
| get | api/borrow/request | | get requester list |
| get | api/borrow/:id | id | get borrow detail |
| put | api/borrow/request/msg/:id | id,content | add message |
| put | api/borrow/reply/msg/:id | id,content |replay requester message |
| put | api/borrow/refuse/:id | id,content | refuse requester |
| put | api/borrow/confirm/:id | id,content | confirm requester |
| put | api/borrow/return/:id | id | return book |