export default { async fetch(request, env) { const url = new URL(request.url); // Audio Request if (url.pathname === "/music/song.mp3") { const audioFile = await env.AUDIO_KV.get("song.mp3", { type: "arrayBuffer" }); if (audioFile) { return new Response(audioFile, { headers: { "Content-Type": "audio/mpeg" }, }); } else { return new Response("Audio file not found", { status: 404 }); } } // HTML request return new Response( ` The Harbor of the Heart

Welcome to Big Pretty's little music station

Relax and enjoy the wonderful music

Current background music:

Dear friends, please love life!

When we know how to cherish ordinary happiness, we are already winners in life!

`, { headers: { "Content-Type": "text/html;charset=UTF-8" }, } ); }, };