From 641a72b06ceda46d8adeeff143dac5b491c7dfec Mon Sep 17 00:00:00 2001 From: binaryify Date: Fri, 25 Oct 2019 14:58:34 +0800 Subject: [PATCH] #615 --- CHANGELOG.MD | 3 +++ app.js | 2 +- docs/README.md | 9 +++++++++ package.json | 2 +- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 6e052c1f0ac..943264120b3 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,4 +1,7 @@ # 更新日志 +### 3.24.1 | 2019.10.25 +- 修改默认绑定 HOST [#615](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/615) + ### 3.24.0 | 2019.10.22 - 新增`类别热门电台` 接口 [#607](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/607) diff --git a/app.js b/app.js index 70526a5b183..6ccd6177fe7 100644 --- a/app.js +++ b/app.js @@ -83,7 +83,7 @@ fs.readdirSync(path.join(__dirname, 'module')).reverse().forEach(file => { }) const port = process.env.PORT || 3000 -const host = process.env.HOST || 'localhost' +const host = process.env.HOST || '127.0.0.1' app.server = app.listen(port, host, () => { console.log(`server running @ http://${host}:${port}`) diff --git a/docs/README.md b/docs/README.md index 5aaa095f28f..d10349b8999 100644 --- a/docs/README.md +++ b/docs/README.md @@ -181,6 +181,15 @@ windows 下使用 git-bash 或者 cmder 等终端执行以下命令 : $ set PORT=4000 && node app.js ``` +服务器启动绑定 127.0.0.1,如果需要更改, 可使用以下命令 : Mac/Linux +```shell +$ HOST=localhost node app.js +``` +windows 下使用 git-bash 或者 cmder 等终端执行以下命令 : + +```shell +$ set HOST=localhost && node app.js +``` ## 可以使用代理 在 query 参数中加上 proxy=your-proxy 即可让这一次的请求使用 proxy diff --git a/package.json b/package.json index a9cfde5e932..85e99df3a55 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "NeteaseCloudMusicApi", - "version": "3.24.0", + "version": "3.24.1", "description": "网易云音乐 NodeJS 版 API", "scripts": { "start": "node app.js",