Skip to content

Commit 703f51b

Browse files
committed
支持文件上传
1 parent bd32618 commit 703f51b

File tree

5 files changed

+329
-1
lines changed

5 files changed

+329
-1
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@
2020
pnpm start
2121
```
2222

23+
## 支持的 HTTP 方法
24+
25+
- GET
26+
- POST
27+
- PUT
28+
- DELETE
29+
- PATCH
30+
- OPTIONS
31+
- HEAD
32+
2333
## 贡献指南
2434

2535
欢迎提交 Issue 和 Pull Request!在提交 PR 之前,请确保:

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"dependencies": {
1010
"body-parser": "^1.20.2",
1111
"cors": "^2.8.5",
12-
"express": "^4.18.2"
12+
"express": "^4.18.2",
13+
"multer": "1.4.5-lts.1"
1314
},
1415
"devDependencies": {
1516
"nodemon": "^3.1.9"

pnpm-lock.yaml

Lines changed: 121 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/routes/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ const router = express.Router();
33

44
router.use('/', require('./basic'))
55
router.use('/posts', require('./posts'))
6+
router.use('/upload', require('./upload'))
67

78
module.exports = router;

0 commit comments

Comments
 (0)