From df4d84610ad2b543a37cb3bcac9887bfef0b8994 Mon Sep 17 00:00:00 2001 From: Rishi Raj Jain Date: Tue, 18 Oct 2022 13:01:21 +0530 Subject: [PATCH] Fix port env in standalone mode (#5111) --- .changeset/short-lemons-fold.md | 5 +++++ packages/integrations/node/src/standalone.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/short-lemons-fold.md diff --git a/.changeset/short-lemons-fold.md b/.changeset/short-lemons-fold.md new file mode 100644 index 0000000000..a0223f699c --- /dev/null +++ b/.changeset/short-lemons-fold.md @@ -0,0 +1,5 @@ +--- +'@astrojs/node': patch +--- + +fix port in standalone mode diff --git a/packages/integrations/node/src/standalone.ts b/packages/integrations/node/src/standalone.ts index e0435a2eab..18cf8a2a5c 100644 --- a/packages/integrations/node/src/standalone.ts +++ b/packages/integrations/node/src/standalone.ts @@ -35,7 +35,7 @@ export function getResolvedHostForHttpServer(host: string | boolean) { } export default function startServer(app: NodeApp, options: Options) { - const port = process.env.PORT ? Number(process.env.port) : options.port ?? 8080; + const port = process.env.PORT ? Number(process.env.PORT) : options.port ?? 8080; const { client } = resolvePaths(options); const handler = middleware(app);