diff options
author | 2023-08-30 10:39:12 +0800 | |
---|---|---|
committer | 2023-08-29 19:39:12 -0700 | |
commit | 3f4bc625ff2313713cf38c3c3ba036781ac1c9a9 (patch) | |
tree | 3a6077aa91fb171255e516d67780d52b2f0e1459 /src/js/node/http.ts | |
parent | 5d84ef778066a6221630d82b7dc6b01aeddc3c26 (diff) | |
download | bun-3f4bc625ff2313713cf38c3c3ba036781ac1c9a9.tar.gz bun-3f4bc625ff2313713cf38c3c3ba036781ac1c9a9.tar.zst bun-3f4bc625ff2313713cf38c3c3ba036781ac1c9a9.zip |
parse unix socket path param in `http.server` (#4390)
Diffstat (limited to 'src/js/node/http.ts')
-rw-r--r-- | src/js/node/http.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/js/node/http.ts b/src/js/node/http.ts index 2be1d90b5..46a527d25 100644 --- a/src/js/node/http.ts +++ b/src/js/node/http.ts @@ -447,6 +447,10 @@ class Server extends EventEmitter { listen(port, host, backlog, onListen) { const server = this; + let socketPath; + if (typeof port == "string") { + socketPath = port; + } if (typeof host === "function") { onListen = host; host = undefined; @@ -481,6 +485,7 @@ class Server extends EventEmitter { tls, port, hostname: host, + unix: socketPath, // Bindings to be used for WS Server websocket: { open(ws) { |