Cyan
Cyan5w ago

How to set reuseaddr in `Deno.serve`?

How to set sockopt reuseaddr and reuseport with Deno.serve
5 Replies
Leokuma
Leokuma5w ago
Deno.serve(
{reusePort: true},
() => new Response('hello')
)
Deno.serve(
{reusePort: true},
() => new Response('hello')
)
deno run -A --unstable-net
deno run -A --unstable-net
Cyan
CyanOP5w ago
Why does this isn't stable yet?
Leokuma
Leokuma5w ago
IDK, but maybe because it probably doesn't work on Windows?
Cyan
CyanOP5w ago
I thought those options existed in Windows too?
Leokuma
Leokuma5w ago
Not sure. I'm unable to test it right now

Did you find this page helpful?