18 Commits

Author SHA1 Message Date
binaryify
dea65db2b3 fix: 中间件问题修复 2024-05-08 15:34:54 +08:00
binaryify
5b30e1b222 fix:参数接收问题修复 2024-05-07 22:46:50 +08:00
binaryify
780f30f0b1 feat: 游客登录机制完善 2024-04-30 15:14:32 +08:00
binaryify
a42d2e491e update: 版本更新提示不展示问题修复 2024-01-26 17:38:43 +08:00
binaryify
b8f9110f69 update:文档结构调整 2024-01-23 15:20:25 +08:00
binaryify
3e5c052f98 fix: 支持headers不携带cookie信息 #1744 #1748 2023-05-29 16:30:36 +08:00
Shirtiny
b7aa9f934c read Access-Control-Allow-Origin from env 2023-02-11 14:48:50 +00:00
binaryify
e174de0448 客户端ip传入完善 2022-06-07 11:03:18 +08:00
binaryify
4c643c7d36 修复云盘上传无法获取文件的问题 2022-02-09 15:03:58 +08:00
pan93412
b02d4d5e04
refactor: allow using server statically
將原本 "NeteaseCloudMusicApi/server"
掃描 modules 目錄的部分抽出 server.js,
改移到 main.js。這樣使用者就有辦法只載入
靜態的伺服器部分(不動態載入模組)。

這個 patch 的 breaking changes 不易發生。
可作為 patch version 發佈。
2022-01-28 12:52:21 +08:00
binaryify.zhuang
e7c153d9e9 增加兼容性 2022-01-27 11:23:44 +08:00
pan93412
c412f53f11
feat(server): allow printing out module paths 2022-01-26 14:42:50 +08:00
pan93412
7061a9ea82
refactor!: use server.js as main.js
server.js 有 main.js 原本的功能 (getModulesDefinitions)

BREAKING CHANGES: 所有使用到這個 lib 的應用程式
,皆需更改為 .getModulesDefinitions()。
2022-01-26 14:34:35 +08:00
pan93412
4e434a2691
feat(server): add field "identifier"
I'm going to replace the function of "main.js".
2022-01-26 14:20:54 +08:00
pan93412
5bf53028ef
feat(server): allow passing modules manually
自行維護 require 名單以相容 Webpack。
2022-01-26 14:14:24 +08:00
pan93412
fb04e512c0
fix(server): remove the shebang line 2022-01-26 11:38:08 +08:00
pan93412
0ac00325c8
refactor(server): replace the deprecated function
Express 4.x 以上版本已經內建 body-parser。
2022-01-26 11:34:35 +08:00
pan93412
7985690987
refactor(server): separate server from app
我們需要 NCM API 的伺服器部分,但 app.js
目前的做法讓我們不太好單獨啟動伺服器。

我將 app.js 的伺服器部分抽成各個函數,並將原有
會 blocking 的函數更改為非同步函式。
這樣不僅能最大化善用 Node.js 的 Event Loop,
亦能提升未來維護的程式碼易讀性。
2022-01-26 11:29:07 +08:00