https://github.com/imweb/fis3-server-imweb
another fis3 server.
https://github.com/imweb/fis3-server-imweb
Last synced: about 2 months ago
JSON representation
another fis3 server.
- Host: GitHub
- URL: https://github.com/imweb/fis3-server-imweb
- Owner: imweb
- License: bsd-2-clause
- Created: 2016-10-20T02:43:11.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-10-20T02:45:08.000Z (over 9 years ago)
- Last Synced: 2025-02-28T23:53:46.212Z (over 1 year ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 27
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fis3-server-imweb
**fork from https://github.com/fex-team/fis3-server-node**
可以处理上传文件的服务器。
## 设置
```js
fis.set('server.type', 'imweb');
```
## 相关接口
* 使用中间件 `multer` ,可以查询其[文档](https://github.com/expressjs/multer/blob/master/doc/README-zh-cn.md)
* fis 中 mock 数据的相关文档,[这里](http://fis.baidu.com/fis3/docs/node-mock.html)
## 实例
```js
module.exports = (req, res) => {
//上传的文件在 req.files 中
// req.files 是一个数组
const file = req.files && req.files[0];
// todo
};
```