Skip to content
DocsTry Aspire
DocsTry

withHttpEndpoint

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

Signature

methodwithHttpEndpointbuilder
Adds an HTTP endpoint
withHttpEndpoint(
port?: number,
targetPort?: number,
name?: string,
env?: string,
isProxied?: boolean): IResourceWithEndpoints
portnumberoptional
targetPortnumberoptional
namestringoptional
envstringoptional
isProxiedbooleanoptional
IResourceWithEndpoints

Applies to

This method applies to the following types: