function

WithAddress

func WithAddress(address string) ExecuteOption

Configure the HTTP listen address independently from the store adapter.

Source ridu.go:261

@param address
A Go net.Listen TCP address such as :8080 or 127.0.0.1:8080.
@returns
An option to pass directly to ridu.Execute.

The default is :8080, which listens on every interface. Use a loopback address when Ridu must be reachable only through a local reverse proxy or during development.

This controls only the listener. Public host validation belongs to HandlerOptions.AllowedHosts.

Example

go
ridu.WithAddress("127.0.0.1:8080")

Related types