Test
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m51s

This commit is contained in:
Cameron Redmore 2025-08-08 17:49:41 +01:00
parent 826723eb5b
commit 6714a4763a
No known key found for this signature in database

View file

@ -21,8 +21,8 @@ const connections = new Set<any>();
// Function to fetch song from Last.fm
async function fetchLastFmSong(): Promise<LastSong | null> {
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(