Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

WithMappedEndpointPort

Method
📦 CommunityToolkit.Aspire.Hosting.JavaScript.Extensions v13.6.1
func (JavaScriptAppResource) WithMappedEndpointPort(options ...*WithMappedEndpointPortOptions) JavaScriptAppResource

Signature

methodWithMappedEndpointPortbuilder
Maps the endpoint port for the JavaScript app resource to the appropriate command line argument
WithMappedEndpointPort(options ...*WithMappedEndpointPortOptions) JavaScriptAppResource
options...*WithMappedEndpointPortOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithMappedEndpointPortOptions argument.

EndpointName*stringThe name of the endpoint to map. If not specified, it will use the first HTTP or HTTPS endpoint found.
JavaScriptAppResource

A reference to the IResourceBuilder.

Returns a handle; failures surface later via Err().

Applies to

This method applies to the following types: