Skip to content

Commit 90ab1b8

Browse files
Merge pull request #122 from erikrichardlarson/more-updates
Album updates
2 parents 653bc55 + 285692e commit 90ab1b8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

public/album_art.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
}
2828

2929
const setupWebSocket = (elements) => {
30-
const socket = new WebSocket('ws://10.0.0.162:3000');
30+
const socket = new WebSocket('ws://WEBSOCKET_IP:3000');
3131

3232
socket.addEventListener('message', (event) => {
3333
const trackDetails = JSON.parse(event.data);

src/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@ app.on("ready", async () => {
5454
const destCssPath = join(userDataPath, 'tailwind.css');
5555

5656
try {
57-
const localIP = getLocalIP();
58-
let data = await fs.promises.readFile(sourceHtmlPath, 'utf8');
59-
data = data.replace('WEBSOCKET_IP', localIP);
60-
await fs.promises.writeFile(sourceHtmlPath, data, 'utf8');
6157
await Promise.all([
6258
copy(sourceCssPath, destCssPath),
6359
copy(sourceHtmlPath, destHtmlPath),
6460
]);
61+
const localIP = getLocalIP();
62+
let data = await fs.promises.readFile(destHtmlPath, 'utf8');
63+
data = data.replace('WEBSOCKET_IP', localIP);
64+
await fs.promises.writeFile(destHtmlPath, data, 'utf8');
6565
} catch(err) {
6666
console.error(`Error occurred during file copy: ${err}`);
6767
}

0 commit comments

Comments
 (0)