diff --git a/server/server.js b/server/server.js index 8907019..7ea085e 100644 --- a/server/server.js +++ b/server/server.js @@ -4,8 +4,9 @@ import Hyperswarm from 'hyperswarm'; import Docker from 'dockerode'; import crypto from 'hypercore-crypto'; 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 connectedPeers = new Set(); const terminalSessions = new Map(); // Map to track terminal sessions per peer @@ -427,4 +428,4 @@ process.on('SIGINT', () => { console.log('[INFO] Server shutting down'); swarm.destroy(); process.exit(); -}); \ No newline at end of file +});