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

Nodejs实现微服务

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

GIT地址:https://github.com/FireSmallPanda/nodeapi.git 欢迎Star

接口列表

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

files-api 文件微服务

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

Build Setup

# 下载 dependencies
npm install

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

配置

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

接口配置

nodeapi\files-api\config\文件上传微服务接口.postman_collection.json 用于导入postman生成接口

文件上传接口

files-api
├── config                   # Compiled files (alternatively `dist`)
├── controller                    # Documentation files (alternatively `doc`)
├── models                     # Source files (alternatively `lib` or `app`)
└── README.md