Cyan
Cyan2mo ago

How to set reuseaddr in `Deno.serve`?

How to set sockopt reuseaddr and reuseport with Deno.serve
5 Replies
Leokuma
Leokuma2mo 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
CyanOP2mo ago
Why does this isn't stable yet?
Leokuma
Leokuma2mo ago
IDK, but maybe because it probably doesn't work on Windows?
Cyan
CyanOP2mo ago
I thought those options existed in Windows too?
Leokuma
Leokuma2mo ago
Not sure. I'm unable to test it right now

Did you find this page helpful?