Skip to content
DocsTry Aspire
DocsTry

RedisResource.withHostPort

Method
📦 Aspire.Hosting.Redis v13.4.0
interface RedisResource {
// ... omitted for brevity
withHostPort(port: number): RedisResource;
}

Signature

methodwithHostPortbuilder
Configures the host port that the Redis resource is exposed on instead of using randomly assigned port.
withHostPort(port: number): RedisResource
portnumber
RedisResource

Defined on

This method is defined on the following type: