Skip to content

Commit

Permalink
fix: allow port 0 to be provided to server (#7530)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexandre Hitchcox <alexandre.hitchcox@livenation.co.uk>
  • Loading branch information
ahtcx and ahtcx committed Mar 31, 2022
1 parent 29c1ec0 commit 173e4c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/server/index.ts
Expand Up @@ -607,7 +607,7 @@ async function startServer(
}

const options = server.config.server
const port = inlinePort || options.port || 3000
const port = inlinePort ?? options.port ?? 3000
const hostname = resolveHostname(options.host)

const protocol = options.https ? 'https' : 'http'
Expand Down

0 comments on commit 173e4c9

Please sign in to comment.