From 6714a4763af2b917fee92ab09455407e6c58d046 Mon Sep 17 00:00:00 2001 From: Cameron Redmore Date: Fri, 8 Aug 2025 17:49:41 +0100 Subject: [PATCH] Test --- src/server.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/server.ts b/src/server.ts index 7ef52b5..a9efd7c 100644 --- a/src/server.ts +++ b/src/server.ts @@ -21,8 +21,8 @@ const connections = new Set(); // Function to fetch song from Last.fm async function fetchLastFmSong(): Promise { - const apiKey = process.env.LASTFM_API_KEY; - const username = process.env.LASTFM_USERNAME; + const apiKey = Bun.env.LASTFM_API_KEY; + const username = Bun.env.LASTFM_USERNAME; if (!apiKey || !username) { console.error('Last.fm API key or username not configured'); @@ -89,7 +89,7 @@ setInterval(checkAndUpdateSong, 1000); checkAndUpdateSong(); // Determine static assets path - adjust for compiled executable -const assetsPath = process.env.NODE_ENV === 'production' +const assetsPath = Bun.env.NODE_ENV === 'production' ? path.join(path.dirname(process.execPath || __dirname), 'dist') : 'dist'; @@ -124,8 +124,8 @@ const app = new Elysia() }, }) .listen({ - port: process.env.PORT || 3000, - hostname: process.env.NODE_ENV === 'production' ? '0.0.0.0' : 'localhost' + port: Bun.env.PORT || 3000, + hostname: Bun.env.NODE_ENV === 'production' ? '0.0.0.0' : 'localhost' }); console.log(