bun icon indicating copy to clipboard operation
bun copied to clipboard

Fixes #12182 - update default port when server is created

Open davidstevens37 opened this issue 8 months ago • 1 comments

What does this PR do?

This PR sets the default port to 0, which will allow the OS to assign an available ephemeral port when the server is not instructed to use a specific port resolving

Fixes #12182

  • [x] Code changes

How did you verify your code works?

  • [x] I wrote automated tests
  • [x] I ran my tests locally and they pass (build/bun-debug test test/js/node/http/node-http.test.ts)
✓ node:http > createServer > should use the provided port [2.02ms]
✓ node:http > createServer > should assign a random port when undefined [1.47ms]

davidstevens37 avatar Jun 27 '24 12:06 davidstevens37