From cdbf77b4d94425abd870aeed6491b1361401486e Mon Sep 17 00:00:00 2001 From: "Bean.Wei" <157318439@qq.com> Date: Wed, 26 Oct 2022 14:34:53 +0800 Subject: [PATCH 1/3] integrations/node: fix standalone on windows --- packages/integrations/node/src/http-server.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/integrations/node/src/http-server.ts b/packages/integrations/node/src/http-server.ts index 98cde3728320..dd6d10686263 100644 --- a/packages/integrations/node/src/http-server.ts +++ b/packages/integrations/node/src/http-server.ts @@ -16,10 +16,9 @@ export function createServer( ) { const listener: http.RequestListener = (req, res) => { if (req.url) { - const fileURL = new URL('.' + req.url, client); - - const stream = send(req, fileURLToPath(fileURL), { - dotfiles: 'deny', + const stream = send(req, encodeURI(req.url), { + root: fileURLToPath(client), + dotfiles: "deny" }); let forwardError = false; From 8cfdc1dd87e28522e9c236a757efe5c5533b3cb8 Mon Sep 17 00:00:00 2001 From: "Bean.Wei" <157318439@qq.com> Date: Thu, 27 Oct 2022 08:49:01 +0800 Subject: [PATCH 2/3] docs: add chengeset --- .changeset/metal-boxes-compare.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/metal-boxes-compare.md diff --git a/.changeset/metal-boxes-compare.md b/.changeset/metal-boxes-compare.md new file mode 100644 index 000000000000..65844e811c51 --- /dev/null +++ b/.changeset/metal-boxes-compare.md @@ -0,0 +1,5 @@ +--- +'@astrojs/node': major +--- + +fix static server path for windows system From f823a3d615c61fff2059a084a6e45879f50d88d6 Mon Sep 17 00:00:00 2001 From: "Bean.Wei" <157318439@qq.com> Date: Thu, 27 Oct 2022 17:12:33 +0800 Subject: [PATCH 3/3] chore: update changeset --- .changeset/metal-boxes-compare.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/metal-boxes-compare.md b/.changeset/metal-boxes-compare.md index 65844e811c51..7e9495a07b31 100644 --- a/.changeset/metal-boxes-compare.md +++ b/.changeset/metal-boxes-compare.md @@ -1,5 +1,5 @@ --- -'@astrojs/node': major +'@astrojs/node': patch --- fix static server path for windows system