提交 d9e8ffad 编写于 作者: B binaryify

docker 构建文件的一些增强以及增加访问日志和调试输出

上级 1ca1f234
# 更新日志 # 更新日志
### 2.9.0 | 2018.01.26
docker 构建文件的一些增强以及增加访问日志和调试输出
### 2.8.9 | 2018.01.24 ### 2.8.9 | 2018.01.24
修复歌单详情数据不完整的问题,更新依赖 修复歌单详情数据不完整的问题,更新依赖
......
# 网易云音乐 API # 网易云音乐 API
网易云音乐 Node.js API service 网易云音乐 Node.js API service
<p> <p>
<a href="https://www.npmjs.com/package/NeteaseCloudMusicApi"><img src="https://img.shields.io/npm/v/NeteaseCloudMusicApi.svg" alt="Version"></a> <a href="https://www.npmjs.com/package/NeteaseCloudMusicApi"><img src="https://img.shields.io/npm/v/NeteaseCloudMusicApi.svg" alt="Version"></a>
<a href="https://www.npmjs.com/package/NeteaseCloudMusicApi"><img src="https://img.shields.io/npm/l/NeteaseCloudMusicApi.svg" alt="License"></a> <a href="https://www.npmjs.com/package/NeteaseCloudMusicApi"><img src="https://img.shields.io/npm/l/NeteaseCloudMusicApi.svg" alt="License"></a>
...@@ -9,95 +11,128 @@ ...@@ -9,95 +11,128 @@
</p> </p>
## 灵感来自 ## 灵感来自
[disoul/electron-cloud-music](https://github.com/disoul/electron-cloud-music) [disoul/electron-cloud-music](https://github.com/disoul/electron-cloud-music)
[darknessomi/musicbox](https://github.com/darknessomi/musicbox) [darknessomi/musicbox](https://github.com/darknessomi/musicbox)
[sqaiyan/netmusic-node](https://github.com/sqaiyan/netmusic-node) [sqaiyan/netmusic-node](https://github.com/sqaiyan/netmusic-node)
## 版本新特性 ## 版本新特性
### 2.9.0 | 2018.01.26
docker 构建文件的一些增强以及增加访问日志和调试输出
### 2.8.2 | 2018.01.05 ### 2.8.2 | 2018.01.05
增加Dockerfile,支持以Docker容器模式运行
增加 Dockerfile,支持以 Docker 容器模式运行
### 2.8.1 | 2018.01.04 ### 2.8.1 | 2018.01.04
添加了proxy功能
添加了 proxy 功能
### 2.8.0 | 2018.01.04 ### 2.8.0 | 2018.01.04
用 'request' 重写了请求函数 用 'request' 重写了请求函数
### 2.6.5 | 2017.7.16 ### 2.6.5 | 2017.7.16
优化 CORS 设置 优化 CORS 设置
### 2.6.4 | 2017.7.16 ### 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) [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) [issue:83](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/83)
### 2.6.2 | 2017.7.16 ### 2.6.2 | 2017.7.16
修复垃圾桶接口 修复垃圾桶接口
### 2.6.1 | 2017.7.16 ### 2.6.1 | 2017.7.16
修复红心接口 修复红心接口
### 2.6.0 | 2017.6.25 ### 2.6.0 | 2017.6.25
修复签到接口 修复签到接口
### 2.5.9 | 2017.6.14 ### 2.5.9 | 2017.6.14
增加启动说明页 增加启动说明页
### 2.5.8 | 2017.6.1 ### 2.5.8 | 2017.6.1
修复若干细节问题 修复若干细节问题
### 2.5.7 | 2017.5.22 ### 2.5.7 | 2017.5.22
修复若干问题 修复若干问题
### 2.5.6 | 2017.5.14 ### 2.5.6 | 2017.5.14
增加动态消息接口 增加动态消息接口
### 2.5.5 | 2017.5.10 ### 2.5.5 | 2017.5.10
修复 mv 排行榜接口崩溃问题 修复 mv 排行榜接口崩溃问题
### 2.5.4 | 2017.5.5 ### 2.5.4 | 2017.5.5
新增点赞接口,更新文档 新增点赞接口,更新文档
### 2.5.3 | 2017.5.2 ### 2.5.3 | 2017.5.2
修复歌手单曲数据空白问题和文档获取歌手单曲url 描述问题,更新文档
修复歌手单曲数据空白问题和文档获取歌手单曲 url 描述问题,更新文档
### 2.5.0 | 2017.4.29 ### 2.5.0 | 2017.4.29
增加 mv/专辑/歌单评论接口,增加云盘相关接口,增加获取用户动态/信息接口,增加关注/粉丝列表接口,增加收藏歌单接口,增加相似 mv/歌曲/用户接口,增加 banner 接口,增加刷新登录接口,增加电台相关接口,补充评论接口,更新文档
增加 mv/专辑/歌单评论接口,增加云盘相关接口,增加获取用户动态/信息接口,增加关注/粉
丝列表接口,增加收藏歌单接口,增加相似 mv/歌曲/用户接口,增加 banner 接口,增加刷新
登录接口,增加电台相关接口,补充评论接口,更新文档
### 2.4.6 | 2017.4.21 ### 2.4.6 | 2017.4.21
增加播放 mv 接口,更新文档 增加播放 mv 接口,更新文档
### 2.4.5 | 2017.4.20 ### 2.4.5 | 2017.4.20
增加歌手专辑,歌手单曲等接口,修复/album 接口描述错误,更新文档 增加歌手专辑,歌手单曲等接口,修复/album 接口描述错误,更新文档
### 2.4.0 | 2017.4.20 ### 2.4.0 | 2017.4.20
增加歌单(网友精选碟),新碟上架,热门歌手等接口,更新文档 增加歌单(网友精选碟),新碟上架,热门歌手等接口,更新文档
### 2.3.4 | 2017.4.20 ### 2.3.4 | 2017.4.20
增加歌曲详情接口,更新文档 增加歌曲详情接口,更新文档
### 2.3.0 | 2017.4.15 ### 2.3.0 | 2017.4.15
增加排行榜接口,更新文档 增加排行榜接口,更新文档
### 2.2.0 |2017.4.14 ### 2.2.0 |2017.4.14
增加私人 FM, 喜欢歌曲,垃圾桶,每日签到等接口,更新文档 增加私人 FM, 喜欢歌曲,垃圾桶,每日签到等接口,更新文档
### 2.1.3 | 2017.4.6 ### 2.1.3 | 2017.4.6
改善文档 改善文档
### 2.1.0 | 2017.4.6 ### 2.1.0 | 2017.4.6
增加获取评论接口以及对应单元测试,增加更新日志 增加获取评论接口以及对应单元测试,增加更新日志
### 2.0.0 | 2017.4.1 ### 2.0.0 | 2017.4.1
版本升级到 2.0.增加使用文档,完成项目重构,增加更完善的单元测试,升级 api 到 v2+,支持登录并获取用户信息和创建的歌单,可通过获取音乐 url 接口获取用户歌单里的的音乐,获取每日推荐歌单和每日推荐音乐
版本升级到 2.0.增加使用文档,完成项目重构,增加更完善的单元测试,升级 api 到 v2+,支
持登录并获取用户信息和创建的歌单,可通过获取音乐 url 接口获取用户歌单里的的音乐,
获取每日推荐歌单和每日推荐音乐
## 功能特性 ## 功能特性
1. 登录 1. 登录
2. 刷新登录 2. 刷新登录
3. 获取用户信息,歌单,收藏,mv, dj 数量 3. 获取用户信息,歌单,收藏,mv, dj 数量
...@@ -160,45 +195,54 @@ ...@@ -160,45 +195,54 @@
60. 给评论点赞 60. 给评论点赞
## 环境要求 ## 环境要求
需要 NodeJS 6.0+ 环境 需要 NodeJS 6.0+ 环境
## 安装 ## 安装
``` shell
```shell
$ git clone git@github.com:Binaryify/NeteaseCloudMusicApi.git $ git clone git@github.com:Binaryify/NeteaseCloudMusicApi.git
$ npm install $ npm install
``` ```
## 运行 ## 运行
``` shell
```shell
$ node app.js $ node app.js
``` ```
服务器启动默认端口为3000,若不想使用3000端口,可使用以下命令:
Mac/Linux 服务器启动默认端口为 3000,若不想使用 3000 端口,可使用以下命令: Mac/Linux
```shell ```shell
$ PORT=4000 node app.js $ PORT=4000 node app.js
``` ```
windows 下使用 git-bash 或者 cmder 等终端执行以下命令: windows 下使用 git-bash 或者 cmder 等终端执行以下命令:
```shell ```shell
$ set PORT=4000 && node app.js $ set PORT=4000 && node app.js
``` ```
## Docker容器运行 ## Docker 容器运行
```shell ```shell
docker pull pengxiao/netease-music-api docker pull pengxiao/netease-music-api
docker run -d -p 3000:3000 pengxiao/netease-music-api docker run -d -p 3000:3000 pengxiao/netease-music-api
``` ```
## 使用文档 ## 使用文档
[文档地址](https://binaryify.github.io/NeteaseCloudMusicApi) [文档地址](https://binaryify.github.io/NeteaseCloudMusicApi)
![文档](https://raw.githubusercontent.com/Binaryify/NeteaseCloudMusicApi/master/static/docs.png) ![文档](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 ```shell
$ npm test $ npm test
``` ```
...@@ -206,4 +250,5 @@ $ npm test ...@@ -206,4 +250,5 @@ $ npm test
![单元测试](https://raw.githubusercontent.com/Binaryify/NeteaseCloudMusicApi/master/static/screenshot2.png) ![单元测试](https://raw.githubusercontent.com/Binaryify/NeteaseCloudMusicApi/master/static/screenshot2.png)
## License ## License
[The MIT License (MIT)](https://github.com/Binaryify/NeteaseCloudMusicApi/blob/master/LICENSE) [The MIT License (MIT)](https://github.com/Binaryify/NeteaseCloudMusicApi/blob/master/LICENSE)
...@@ -16,6 +16,10 @@ ...@@ -16,6 +16,10 @@
## 版本新特性 ## 版本新特性
### 2.9.0 | 2018.01.26
docker 构建文件的一些增强以及增加访问日志和调试输出
### 2.8.9 | 2018.01.24 ### 2.8.9 | 2018.01.24
修复歌单详情数据不完整的问题,更新依赖 修复歌单详情数据不完整的问题,更新依赖
...@@ -156,12 +160,15 @@ fetch(url).then(function() { ...@@ -156,12 +160,15 @@ fetch(url).then(function() {
## Docker 容器运行 ## Docker 容器运行
> 注意: 在docker中运行的时候, 由于使用了request来发请求, 所以会检查几个proxy相关的环境变量(如下所列), 这些环境变量 > 注意: 在 docker 中运行的时候, 由于使用了 request 来发请求, 所以会检查几个
会影响到request的代理, 详情请参考[request的文档](https://github.com/request/request#proxies), 如果这些环境变量 > proxy 相关的环境变量(如下所列), 这些环境变量 会影响到 request 的代理, 详情请参
指向的代理不可用, 那么就会造成错误, 所以在使用docker的时候一定要注意这些环境变量. 不过, 要是你在query中加上了proxy参数, > 考[request 的文档](https://github.com/request/request#proxies), 如果这些环境变
那么环境变量会被覆盖, 就会用你通过proxy参数提供的代理了. > 量 指向的代理不可用, 那么就会造成错误, 所以在使用 docker 的时候一定要注意这些
> 环境变量. 不过, 要是你在 query 中加上了 proxy 参数, 那么环境变量会被覆盖, 就会
request相关的环境变量 > 用你通过 proxy 参数提供的代理了.
request 相关的环境变量
1. http_proxy 1. http_proxy
2. https_proxy 2. https_proxy
3. HTTP_PROXY 3. HTTP_PROXY
......
{ {
"name": "NeteaseCloudMusicApi", "name": "NeteaseCloudMusicApi",
"version": "2.8.9", "version": "2.9.0",
"description": "网易云音乐 NodeJS 版 API", "description": "网易云音乐 NodeJS 版 API",
"scripts": { "scripts": {
"start": "node app.js", "start": "node app.js",
...@@ -8,17 +8,9 @@ ...@@ -8,17 +8,9 @@
"precommit": "lint-staged" "precommit": "lint-staged"
}, },
"lint-staged": { "lint-staged": {
"*.js": [ "*.js": ["prettier --write", "git add"]
"prettier --write",
"git add"
]
}, },
"keywords": [ "keywords": ["网易云音乐", "网易云", "音乐", "网易云音乐nodejs"],
"网易云音乐",
"网易云",
"音乐",
"网易云音乐nodejs"
],
"author": "", "author": "",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册