Skip to content

Commit

Permalink
Fix port env in standalone mode (#5111)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rishi Raj Jain authored Oct 18, 2022
1 parent ef0c543 commit df4d846
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/short-lemons-fold.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/node': patch
---

fix port in standalone mode
2 changes: 1 addition & 1 deletion packages/integrations/node/src/standalone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit df4d846

Please sign in to comment.