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) }); }