Test
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m51s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m51s
This commit is contained in:
parent
826723eb5b
commit
6714a4763a
1 changed files with 5 additions and 5 deletions
|
@ -21,8 +21,8 @@ const connections = new Set<any>();
|
||||||
|
|
||||||
// Function to fetch song from Last.fm
|
// Function to fetch song from Last.fm
|
||||||
async function fetchLastFmSong(): Promise<LastSong | null> {
|
async function fetchLastFmSong(): Promise<LastSong | null> {
|
||||||
const apiKey = process.env.LASTFM_API_KEY;
|
const apiKey = Bun.env.LASTFM_API_KEY;
|
||||||
const username = process.env.LASTFM_USERNAME;
|
const username = Bun.env.LASTFM_USERNAME;
|
||||||
|
|
||||||
if (!apiKey || !username) {
|
if (!apiKey || !username) {
|
||||||
console.error('Last.fm API key or username not configured');
|
console.error('Last.fm API key or username not configured');
|
||||||
|
@ -89,7 +89,7 @@ setInterval(checkAndUpdateSong, 1000);
|
||||||
checkAndUpdateSong();
|
checkAndUpdateSong();
|
||||||
|
|
||||||
// Determine static assets path - adjust for compiled executable
|
// 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')
|
? path.join(path.dirname(process.execPath || __dirname), 'dist')
|
||||||
: 'dist';
|
: 'dist';
|
||||||
|
|
||||||
|
@ -124,8 +124,8 @@ const app = new Elysia()
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.listen({
|
.listen({
|
||||||
port: process.env.PORT || 3000,
|
port: Bun.env.PORT || 3000,
|
||||||
hostname: process.env.NODE_ENV === 'production' ? '0.0.0.0' : 'localhost'
|
hostname: Bun.env.NODE_ENV === 'production' ? '0.0.0.0' : 'localhost'
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue