Nodejs实现微服务(对接阿里云对象存储)

xiaoxiao2025-08-09  9

Nodejs实现微服务

文件的上传有很多种实现方式,今天呢有我给大家带来我自己用nodejs写的一个demo。

GIT地址:https://github.com/FireSmallPanda/files-system.git 欢迎Star

接口列表

文件-api文件微服务

用于处理文件上传下载到服务器的功能

构建设置

# 下载 dependencies npm install # 启动项目(本地版) npm run start # 启动项目(阿里云OSS版) npm run oss

配置

nodeapi\files-api\config\dev.yml用于设置系统配置

接口配置

nodeapi\files-api\config\文件上传微服务接口.postman_收藏品.json用于导入Postman生成接口

文件上传接口

FILE-SYSTEM │ .eslintrc.js │ .gitignore │ Dockerfile // Docker 配置文件 │ README.md │ app.js // 程序主入口 │ ossApp.js │ package-lock.json │ package.json │ test.js │ yarn.lock │ 文件上传微服务接口.postman_collection.json // 接口位置 │ ├─config // 配置层 │ configUtil.js │ dev.yml │ msg.yml │ ossUtil.js │ ├─controller // controller 层 │ ossController.js │ router.js │ └─models // models 层 file.js ossFile.js

源文件

转载请注明原文地址: https://www.6miu.com/read-5034576.html

最新回复(0)