Skip to content

Commit 24e0752

Browse files
MaksimAniskovbrettstack
authored andcommitted
Support Windows (#100)
Story: #38
1 parent 66c2ce8 commit 24e0752

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,13 @@ function startServer(server) {
137137
}
138138

139139
function getSocketPath(socketPathSuffix) {
140+
if (/^win/.test(process.platform)) {
141+
const path = require('path')
142+
return path.join('\\\\?\\pipe', process.cwd(), `server${socketPathSuffix}`)
143+
}
144+
else {
140145
return `/tmp/server${socketPathSuffix}.sock`
146+
}
141147
}
142148

143149
function createServer (requestListener, serverListenCallback, binaryTypes) {

0 commit comments

Comments
 (0)