优化
This commit is contained in:
parent
eb7ce30da9
commit
954af8537b
@ -3,7 +3,6 @@ ARG DEBIAN_FRONTEND=noninteractive
|
|||||||
RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app
|
RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app
|
||||||
WORKDIR /home/node/app
|
WORKDIR /home/node/app
|
||||||
COPY --chown=node:node . .
|
COPY --chown=node:node . .
|
||||||
RUN npm install -g npm
|
|
||||||
USER node
|
USER node
|
||||||
|
|
||||||
RUN npm install --force
|
RUN npm install --force
|
||||||
@ -11,4 +10,4 @@ RUN ls -la
|
|||||||
RUN npm run buildweb
|
RUN npm run buildweb
|
||||||
|
|
||||||
EXPOSE 8095
|
EXPOSE 8095
|
||||||
CMD [ "node", "src/background/server.js" ]
|
CMD [ "node", "src/background/server.js" ]
|
||||||
|
@ -15,7 +15,8 @@ window.__ = __
|
|||||||
if(typeof WEB !== 'undefined')
|
if(typeof WEB !== 'undefined')
|
||||||
{
|
{
|
||||||
const io = require("socket.io-client");
|
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);
|
const emit = window.torrentSocket.emit.bind(window.torrentSocket);
|
||||||
window.torrentSocket.emit = (...data) => {
|
window.torrentSocket.emit = (...data) => {
|
||||||
let id;
|
let id;
|
||||||
@ -85,7 +86,7 @@ else
|
|||||||
|
|
||||||
ipcRenderer.on('url', (event, url) => {
|
ipcRenderer.on('url', (event, url) => {
|
||||||
console.log('url', url)
|
console.log('url', url)
|
||||||
router(url)
|
router(url)
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user