function

WithAddress

Configure the HTTP listen address independently from the store adapter.

Example

go
ridu.WithAddress("127.0.0.1:8080")

Arguments

ArgumentTypeDescription
addressstringA Go net.Listen TCP address such as :8080 or 127.0.0.1:8080.

Returns

An option to pass directly to ridu.Execute.

ExecuteOption

How it works

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.

Full signature

Related types