From 1603b2d95f2968be4a403e255eacd39edd399c5d Mon Sep 17 00:00:00 2001 From: Satsuki Akiba Date: Wed, 4 Jun 2025 13:58:47 +0900 Subject: [PATCH] chore: update static file paths and content type --- .gitignore | 1 + server.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 9f1d51a..0feb975 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ dist .env data feed_urls.txt +public diff --git a/server.ts b/server.ts index 6a1ede4..67c4ca8 100644 --- a/server.ts +++ b/server.ts @@ -20,7 +20,7 @@ db.exec(fs.readFileSync(path.join(projectRoot, "schema.sql"), "utf-8")); // 静的ファイルパスの設定 const frontendBuildDir = path.join(projectRoot, "frontend", "dist"); -const podcastAudioDir = path.join(projectRoot, "static", "podcast_audio"); +const podcastAudioDir = path.join(projectRoot, "public", "podcast_audio"); const generalPublicDir = path.join(projectRoot, "public"); const app = new Hono(); @@ -83,7 +83,7 @@ app.get("/podcast_audio/*", async (c) => { const file = Bun.file(audioFilePath); if (await file.exists()) { const blob = await file.arrayBuffer(); - return c.body(blob, 200, { "Content-Type": "audio/mpeg" }); + return c.body(blob, 200, { "Content-Type": "audio/wav" }); } return c.notFound(); });