function
WithAddress
Configure the HTTP listen address independently from the store adapter.
Example
ridu.WithAddress("127.0.0.1:8080")Arguments
| Argument | Type | Description |
|---|---|---|
address | string | A Go net.Listen TCP address such as :8080 or 127.0.0.1:8080. |
Returns
An option to pass directly to ridu.Execute.
ExecuteOptionHow 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
func WithAddress(address string) ExecuteOptionRelated types
ExecuteOptionOne opaque runtime option accepted by Execute.