Skip to content

Commit

Permalink
docker 构建文件的一些增强以及增加访问日志和调试输出
Browse files Browse the repository at this point in the history
  • Loading branch information
binaryify committed Jan 26, 2018
1 parent 2f73cff commit bdfa96f
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 32 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# 更新日志

### 2.9.0 | 2018.01.26

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

### 2.8.9 | 2018.01.24

修复歌单详情数据不完整的问题,更新依赖
Expand Down
75 changes: 60 additions & 15 deletions README.MD
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# 网易云音乐 API

网易云音乐 Node.js API service

<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/l/NeteaseCloudMusicApi.svg" alt="License"></a>
Expand All @@ -9,95 +11,128 @@
</p>

## 灵感来自

[disoul/electron-cloud-music](https://github.com/disoul/electron-cloud-music)

[darknessomi/musicbox](https://github.com/darknessomi/musicbox)

[sqaiyan/netmusic-node](https://github.com/sqaiyan/netmusic-node)


## 版本新特性

### 2.9.0 | 2018.01.26

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

### 2.8.2 | 2018.01.05
增加Dockerfile,支持以Docker容器模式运行

增加 Dockerfile,支持以 Docker 容器模式运行

### 2.8.1 | 2018.01.04
添加了proxy功能

添加了 proxy 功能

### 2.8.0 | 2018.01.04

用 'request' 重写了请求函数

### 2.6.5 | 2017.7.16

优化 CORS 设置

### 2.6.4 | 2017.7.16

添加缓存机制和随机 UA 机制 感谢[@u3u](https://github.com/u3u)
[issue:77](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/77)
优化请求代码 感谢 [@huhuime](https://github.com/huhuime)
[issue:77](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/77) 优化请求
代码 感谢 [@huhuime](https://github.com/huhuime)
[issue:83](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/83)

### 2.6.2 | 2017.7.16

修复垃圾桶接口

### 2.6.1 | 2017.7.16

修复红心接口

### 2.6.0 | 2017.6.25

修复签到接口

### 2.5.9 | 2017.6.14

增加启动说明页

### 2.5.8 | 2017.6.1

修复若干细节问题

### 2.5.7 | 2017.5.22

修复若干问题

### 2.5.6 | 2017.5.14

增加动态消息接口

### 2.5.5 | 2017.5.10

修复 mv 排行榜接口崩溃问题

### 2.5.4 | 2017.5.5

新增点赞接口,更新文档

### 2.5.3 | 2017.5.2
修复歌手单曲数据空白问题和文档获取歌手单曲url 描述问题,更新文档

修复歌手单曲数据空白问题和文档获取歌手单曲 url 描述问题,更新文档

### 2.5.0 | 2017.4.29
增加 mv/专辑/歌单评论接口,增加云盘相关接口,增加获取用户动态/信息接口,增加关注/粉丝列表接口,增加收藏歌单接口,增加相似 mv/歌曲/用户接口,增加 banner 接口,增加刷新登录接口,增加电台相关接口,补充评论接口,更新文档

增加 mv/专辑/歌单评论接口,增加云盘相关接口,增加获取用户动态/信息接口,增加关注/粉
丝列表接口,增加收藏歌单接口,增加相似 mv/歌曲/用户接口,增加 banner 接口,增加刷新
登录接口,增加电台相关接口,补充评论接口,更新文档

### 2.4.6 | 2017.4.21

增加播放 mv 接口,更新文档

### 2.4.5 | 2017.4.20

增加歌手专辑,歌手单曲等接口,修复/album 接口描述错误,更新文档

### 2.4.0 | 2017.4.20

增加歌单(网友精选碟),新碟上架,热门歌手等接口,更新文档

### 2.3.4 | 2017.4.20

增加歌曲详情接口,更新文档

### 2.3.0 | 2017.4.15

增加排行榜接口,更新文档

### 2.2.0 |2017.4.14

增加私人 FM, 喜欢歌曲,垃圾桶,每日签到等接口,更新文档

### 2.1.3 | 2017.4.6

改善文档

### 2.1.0 | 2017.4.6

增加获取评论接口以及对应单元测试,增加更新日志

### 2.0.0 | 2017.4.1
版本升级到 2.0.增加使用文档,完成项目重构,增加更完善的单元测试,升级 api 到 v2+,支持登录并获取用户信息和创建的歌单,可通过获取音乐 url 接口获取用户歌单里的的音乐,获取每日推荐歌单和每日推荐音乐


版本升级到 2.0.增加使用文档,完成项目重构,增加更完善的单元测试,升级 api 到 v2+,支
持登录并获取用户信息和创建的歌单,可通过获取音乐 url 接口获取用户歌单里的的音乐,
获取每日推荐歌单和每日推荐音乐

## 功能特性

1. 登录
2. 刷新登录
3. 获取用户信息,歌单,收藏,mv, dj 数量
Expand Down Expand Up @@ -160,50 +195,60 @@
60. 给评论点赞

## 环境要求

需要 NodeJS 6.0+ 环境

## 安装
``` shell

```shell
$ git clone git@github.com:Binaryify/NeteaseCloudMusicApi.git
$ npm install
```

## 运行
``` shell

```shell
$ node app.js
```
服务器启动默认端口为3000,若不想使用3000端口,可使用以下命令:
Mac/Linux

服务器启动默认端口为 3000,若不想使用 3000 端口,可使用以下命令: Mac/Linux

```shell
$ PORT=4000 node app.js
```

windows 下使用 git-bash 或者 cmder 等终端执行以下命令:

```shell
$ set PORT=4000 && node app.js
```

## Docker容器运行
## Docker 容器运行

```shell
docker pull pengxiao/netease-music-api
docker run -d -p 3000:3000 pengxiao/netease-music-api
```

## 使用文档

[文档地址](https://binaryify.github.io/NeteaseCloudMusicApi)

![文档](https://raw.githubusercontent.com/Binaryify/NeteaseCloudMusicApi/master/static/docs.png)

## 更新日志

[changelog](https://github.com/Binaryify/NeteaseCloudMusicApi/blob/master/CHANGELOG.MD)

## 单元测试

``` shell
```shell
$ npm test
```

![单元测试](https://raw.githubusercontent.com/Binaryify/NeteaseCloudMusicApi/master/static/screenshot1.png)
![单元测试](https://raw.githubusercontent.com/Binaryify/NeteaseCloudMusicApi/master/static/screenshot2.png)

## License

[The MIT License (MIT)](https://github.com/Binaryify/NeteaseCloudMusicApi/blob/master/LICENSE)
19 changes: 13 additions & 6 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@

## 版本新特性

### 2.9.0 | 2018.01.26

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

### 2.8.9 | 2018.01.24

修复歌单详情数据不完整的问题,更新依赖
Expand Down Expand Up @@ -156,12 +160,15 @@ fetch(url).then(function() {

## Docker 容器运行

> 注意: 在docker中运行的时候, 由于使用了request来发请求, 所以会检查几个proxy相关的环境变量(如下所列), 这些环境变量
会影响到request的代理, 详情请参考[request的文档](https://github.com/request/request#proxies), 如果这些环境变量
指向的代理不可用, 那么就会造成错误, 所以在使用docker的时候一定要注意这些环境变量. 不过, 要是你在query中加上了proxy参数,
那么环境变量会被覆盖, 就会用你通过proxy参数提供的代理了.

request相关的环境变量
> 注意: 在 docker 中运行的时候, 由于使用了 request 来发请求, 所以会检查几个
> proxy 相关的环境变量(如下所列), 这些环境变量 会影响到 request 的代理, 详情请参
> [request 的文档](https://github.com/request/request#proxies), 如果这些环境变
> 量 指向的代理不可用, 那么就会造成错误, 所以在使用 docker 的时候一定要注意这些
> 环境变量. 不过, 要是你在 query 中加上了 proxy 参数, 那么环境变量会被覆盖, 就会
> 用你通过 proxy 参数提供的代理了.
request 相关的环境变量

1. http_proxy
2. https_proxy
3. HTTP_PROXY
Expand Down
14 changes: 3 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,16 @@
{
"name": "NeteaseCloudMusicApi",
"version": "2.8.9",
"version": "2.9.0",
"description": "网易云音乐 NodeJS 版 API",
"scripts": {
"start": "node app.js",
"test": "mocha -r intelli-espower-loader -t 20000 test",
"precommit": "lint-staged"
},
"lint-staged": {
"*.js": [
"prettier --write",
"git add"
]
"*.js": ["prettier --write", "git add"]
},
"keywords": [
"网易云音乐",
"网易云",
"音乐",
"网易云音乐nodejs"
],
"keywords": ["网易云音乐", "网易云", "音乐", "网易云音乐nodejs"],
"author": "",
"license": "MIT",
"dependencies": {
Expand Down

0 comments on commit bdfa96f

Please sign in to comment.