diff --git a/danmu_api/README.md b/danmu_api/README.md index 38eabe6..7dd5995 100644 --- a/danmu_api/README.md +++ b/danmu_api/README.md @@ -1,6 +1,6 @@ -# 简单 弹幕 API 服务器 +# MuMu 弹幕 API 服务器 -一个基于 js 的弹幕 API 服务器,兼容弹弹play的搜索、详情查询和弹幕获取功能,以及日志记录。 +一个人人都能部署的基于 js 的弹幕 API 服务器,兼容弹弹play的搜索、详情查询和弹幕获取功能,并提供日志记录,支持vercel/cloudflare/docker/claw等部署方式。 ## 功能 - **API 接口**: @@ -105,6 +105,9 @@ 3. 添加 `TOKEN` 环境变量,输入你的 API 令牌值。 4. 保存并部署。 +### 手动部署 +创建一个worker,并将danmu_api/worker.js里的代码直接拷贝到你创建的worker.js里,并点击部署。 + ## 项目结构 ``` danmu_api/ diff --git a/danmu_api/worker.js b/danmu_api/worker.js index b9424c2..948f768 100644 --- a/danmu_api/worker.js +++ b/danmu_api/worker.js @@ -687,8 +687,9 @@ async function handleRequest(req, env) { if (path === "/" && method === "GET") { log("log", "Accessed homepage with repository information"); return jsonResponse({ - message: "Welcome to the Danmu API server", + message: "Welcome to the MuMu Danmu API server", repository: "https://github.com/huangxd-/danmu_api.git", + description: "一个人人都能部署的基于 js 的弹幕 API 服务器,兼容弹弹play的搜索、详情查询和弹幕获取功能,并提供日志记录,支持vercel/cloudflare/docker/claw等部署方式", notice: "本项目仅为个人爱好开发,代码开源。如有任何侵权行为,请联系本人删除。" }); } diff --git a/danmu_api/worker.test.js b/danmu_api/worker.test.js index 7c77149..5bd8d07 100644 --- a/danmu_api/worker.test.js +++ b/danmu_api/worker.test.js @@ -32,11 +32,7 @@ test('worker.js API endpoints', async (t) => { assert.equal(res.status, 200); assert.equal(res.headers.get('Content-Type'), 'application/json'); - assert.deepEqual(body, { - message: 'Welcome to the Danmu API server', - repository: 'https://github.com/huangxd-/danmu_api.git', - notice: '本项目仅为个人爱好开发,代码开源。如有任何侵权行为,请联系本人删除。' - }); + assert.deepEqual(body.message, 'Welcome to the MuMu Danmu API server'); }); await t.test('GET tencent danmu', async () => {