增加 proxy 功能,修复 cookie 丢失问题

This commit is contained in:
binaryify
2018-01-04 17:06:56 +08:00
parent 752d1965f7
commit 40fe20dba4
4 changed files with 21 additions and 17 deletions
+10 -10
View File
@@ -6,7 +6,7 @@
<a href="https://www.npmjs.com/package/NeteaseCloudMusicApi"><img src="https://img.shields.io/david/dev/binaryify/NeteaseCloudMusicApi.svg" alt="devDependencies" ></a>
<a href="https://www.npmjs.com/package/NeteaseCloudMusicApi"><img src="https://img.shields.io/david/binaryify/NeteaseCloudMusicApi.svg" alt="devDependencies" ></a>
<a href="https://codeclimate.com/github/Binaryify/NeteaseCloudMusicApi"><img src="https://codeclimate.com/github/Binaryify/NeteaseCloudMusicApi/badges/gpa.svg" /></a>
</p>
</p>
## 灵感来自
[disoul/electron-cloud-music](https://github.com/disoul/electron-cloud-music)
@@ -18,7 +18,7 @@
## 版本新特性
### ? ? ? | 2018.01.04
### 2.8.1 | 2018.01.04
添加了proxy功能
### 2.8.0 | 2018.01.04
@@ -28,9 +28,9 @@
优化 CORS 设置
### 2.6.4 | 2017.7.16
添加缓存机制和随机 UA 机制 感谢[@u3u](https://github.com/u3u)
添加缓存机制和随机 UA 机制 感谢[@u3u](https://github.com/u3u)
[issue:77](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/77)
优化请求代码 感谢 [@huhuime](https://github.com/huhuime)
优化请求代码 感谢 [@huhuime](https://github.com/huhuime)
[issue:83](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/83)
### 2.6.2 | 2017.7.16
@@ -160,22 +160,22 @@
## 环境要求
需要 NodeJS 6.0+ 环境
## 安装
## 安装
``` shell
$ git clone [email protected]:Binaryify/NeteaseCloudMusicApi.git
$ npm install
```
## 运行
``` shell
$ node app.js
$ node app.js
```
服务器启动默认端口为3000,若不想使用3000端口,可使用以下命令:
服务器启动默认端口为3000,若不想使用3000端口,可使用以下命令:
Mac/Linux
```shell
$ PORT=4000 node app.js
```
windows 下使用 git-bash 或者 cmder 等终端执行以下命令:
windows 下使用 git-bash 或者 cmder 等终端执行以下命令:
```shell
$ set PORT=4000 && node app.js
```
@@ -186,13 +186,13 @@ $ set PORT=4000 && node app.js
![文档](https://raw.githubusercontent.com/Binaryify/NeteaseCloudMusicApi/master/static/docs.png)
## 更新日志
[changelog](https://github.com/Binaryify/NeteaseCloudMusicApi/blob/master/CHANGELOG.MD)
[changelog](https://github.com/Binaryify/NeteaseCloudMusicApi/blob/master/CHANGELOG.MD)
## 单元测试
``` shell
$ npm test
```
```
![单元测试](https://raw.githubusercontent.com/Binaryify/NeteaseCloudMusicApi/master/static/screenshot1.png)
![单元测试](https://raw.githubusercontent.com/Binaryify/NeteaseCloudMusicApi/master/static/screenshot2.png)