File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 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 ) ;
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments