0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00

Fix port env in standalone mode (#5111)

This commit is contained in:
Rishi Raj Jain 2022-10-18 13:01:21 +05:30 committed by GitHub
parent ef0c543163
commit df4d84610a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
'@astrojs/node': patch
---
fix port in standalone mode

View file

@ -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);