Cyan
Cyan7d ago

How to set reuseaddr in `Deno.serve`?

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

Did you find this page helpful?