withHostPort

Method
📦 Aspire.Hosting.PostgreSQL v17.0.0
interface PostgresServerResource {
// ... omitted for brevity
withHostPort(port: number): PostgresServerResource;
}

Signature

methodwithHostPortbuilder
Configures the host port that the PostgreSQL resource is exposed on instead of using randomly assigned port.
withHostPort(port: number): PostgresServerResource
portnumberThe port to bind on the host. If `null` is used random port will be assigned.
PostgresServerResource

Applies to

This method applies to the following types: