Skip to content
Docs Try Aspire

withHttpEndpoint

Function
📦 Aspire.Hosting v13.2.0-preview.1.26159.1
interface ContainerResource {
// ... omitted for brevity
withHttpEndpoint(
port?: number,
targetPort?: number,
name?: string,
env?: string,
isProxied?: boolean): IResourceWithEndpoints;
}

Signature

method withHttpEndpoint builder
Adds an HTTP endpoint
withHttpEndpoint(
port?: number,
targetPort?: number,
name?: string,
env?: string,
isProxied?: boolean): IResourceWithEndpoints
port number optional
targetPort number optional
name string optional
env string optional
isProxied boolean optional = True
IResourceWithEndpoints

Applies to

This function is an extension method on the following types: