From 954af8537b53d202d3b70aaa232d2e6069f305f9 Mon Sep 17 00:00:00 2001 From: wenyifan Date: Wed, 6 Sep 2023 09:58:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 3 +-- src/app/app.js | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 979ecdd..a927f56 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,6 @@ ARG DEBIAN_FRONTEND=noninteractive RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app WORKDIR /home/node/app COPY --chown=node:node . . -RUN npm install -g npm USER node RUN npm install --force @@ -11,4 +10,4 @@ RUN ls -la RUN npm run buildweb EXPOSE 8095 -CMD [ "node", "src/background/server.js" ] \ No newline at end of file +CMD [ "node", "src/background/server.js" ] diff --git a/src/app/app.js b/src/app/app.js index e958dd8..04455aa 100644 --- a/src/app/app.js +++ b/src/app/app.js @@ -15,7 +15,8 @@ window.__ = __ if(typeof WEB !== 'undefined') { const io = require("socket.io-client"); - window.torrentSocket = io(document.location.protocol + '//' + document.location.hostname + (process.env.NODE_ENV === 'production' ? '/' : ':8095/')); + // window.torrentSocket = io(document.location.protocol + '//' + document.location.hostname + (process.env.NODE_ENV === 'production' ? '/' : ':8095/')); + window.torrentSocket = io(document.location.protocol + '//' + document.location.host + '/'); const emit = window.torrentSocket.emit.bind(window.torrentSocket); window.torrentSocket.emit = (...data) => { let id; @@ -85,7 +86,7 @@ else ipcRenderer.on('url', (event, url) => { console.log('url', url) - router(url) + router(url) }); }