This commit is contained in:
wenyifan 2023-09-06 09:58:44 +08:00
parent eb7ce30da9
commit 954af8537b
2 changed files with 4 additions and 4 deletions

View File

@ -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" ]
CMD [ "node", "src/background/server.js" ]

View File

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