Permalink
Cannot retrieve contributors at this time
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?
backend/readme.md
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
80 lines (71 sloc)
1.98 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |