fix: running on windows #1
@ -4,8 +4,9 @@ import Hyperswarm from 'hyperswarm';
|
|||||||
import Docker from 'dockerode';
|
import Docker from 'dockerode';
|
||||||
import crypto from 'hypercore-crypto';
|
import crypto from 'hypercore-crypto';
|
||||||
import { PassThrough } from 'stream';
|
import { PassThrough } from 'stream';
|
||||||
|
import os from "os";
|
||||||
|
|
||||||
const docker = new Docker({ socketPath: '/var/run/docker.sock' });
|
const docker = new Docker({ socketPath: os.platform() === "win32" ? '//./pipe/dockerDesktopLinuxEngine' : '/var/run/docker.sock' });
|
||||||
const swarm = new Hyperswarm();
|
const swarm = new Hyperswarm();
|
||||||
const connectedPeers = new Set();
|
const connectedPeers = new Set();
|
||||||
const terminalSessions = new Map(); // Map to track terminal sessions per peer
|
const terminalSessions = new Map(); // Map to track terminal sessions per peer
|
||||||
@ -427,4 +428,4 @@ process.on('SIGINT', () => {
|
|||||||
console.log('[INFO] Server shutting down');
|
console.log('[INFO] Server shutting down');
|
||||||
swarm.destroy();
|
swarm.destroy();
|
||||||
process.exit();
|
process.exit();
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user