From 1334c19f7506c2826db417824cb893103be71e2d Mon Sep 17 00:00:00 2001 From: Maksim Aniskov Date: Wed, 27 Sep 2017 11:46:13 +0700 Subject: [PATCH] Support Windows Story: https://github.com/awslabs/aws-serverless-express/issues/38 --- index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/index.js b/index.js index 6eb3de7d..a02e4544 100644 --- a/index.js +++ b/index.js @@ -137,7 +137,13 @@ function startServer(server) { } function getSocketPath(socketPathSuffix) { + if (/^win/.test(process.platform)) { + const path = require('path') + return path.join('\\\\?\\pipe', process.cwd(), `server${socketPathSuffix}`) + } + else { return `/tmp/server${socketPathSuffix}.sock` + } } function createServer (requestListener, serverListenCallback, binaryTypes) {