源码来自 -> https://github.com/Binaryify/NeteaseCloudMusicApi (感谢Binaryify)
-> https://github.com/qier222/YesPlayMusic (感谢qier222)
示例 ->https://music.bluepill.one/
#安装node.js LTS (v14.x) apt update && apt install -y git curl curl -sL https://deb.nodesource.com/setup_lts.x | bash - apt-get install -y nodejs #安装网易云音乐API git clone https://github.com/Binaryify/NeteaseCloudMusicApi.git cd NeteaseCloudMusicApi npm install #运行网易云音乐API(可以通过nohup screen supervisor等后台运行) cd NeteaseCloudMusicApi PORT=3000 HOST=0.0.0.0 node app.js #安装yarn curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list apt-get update && apt-get install -y yarn #安装YesPlayMusic git clone https://github.com/qier222/YesPlayMusic.git cd YesPlayMusic yarn install cp .env.example .env #假设上述网易云音乐API解析到了musicapi.example.com sed -i 's/127.0.0.1/musicapi.example.com/g' ./.env yarn run build #将 /dist 目录下的文件上传到你的 Web 服务器(不限制本机),最后启动web服务
如果顺利搭建完成加载不出来页面,服务器端ping一下music.163.com。
如果不通,找个能ping通的ip,然后修改/etc/hosts即可
原文地址:https://www.hostloc.com/thread-785317-1-1.html
© 版权声明
内容来源于网络或本站原创,如有任何问题请联系站长
THE END