https://github.com/gssify/nei-proxy-middleware
A api proxy middleware for NEI(https://nei.netease.com)
https://github.com/gssify/nei-proxy-middleware
Last synced: 12 months ago
JSON representation
A api proxy middleware for NEI(https://nei.netease.com)
- Host: GitHub
- URL: https://github.com/gssify/nei-proxy-middleware
- Owner: gssify
- Created: 2018-03-13T08:03:01.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-16T10:15:56.000Z (over 8 years ago)
- Last Synced: 2025-02-25T10:33:06.576Z (over 1 year ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NEI Proxy Middleware
NEI(https://nei.netease.com/) 平台接口转换工具,可以像使用 easy-mock 一样使用
## 使用
### 安装
```js
npm install --save-dev nei-proxy-middleware
```
### 开发服务器配置
```js
const express = require('express')
const neiProxyMiddleware = require('nei-proxy-middleware')
const app = express()
app.use(neiProxyMiddleware({ key: 'NEI_KEY', mockname: 'neimock', rule: '/api' }))
app.listen(3000)
```
### 业务代码修改
```js
request('http://foo.com/api/bar?neimock=true', function (data) {
// data: remote from nei
})
```
## 问题
不支持 Koa