deno icon indicating copy to clipboard operation
deno copied to clipboard

feat(serve): env var `DENO_SERVE_ADDRESS` for configuring default listener address

Open losfair opened this issue 1 year ago • 0 comments

This patch adds support for configuring a default listen address for Deno.serve() with the DENO_SERVE_ADDRESS environment variable. If none of options.{hostname,port,path} is set, the listener will attempt to parse DENO_SERVE_ADDRESS and listen on the specified endpoint.

The listen address is specified in a network/address format. For example:

  • tcp/0.0.0.0:8080
  • unix//var/run/http.sock

losfair avatar Jul 01 '24 16:07 losfair