Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

AddNodeApp

Method
📦 Aspire.Hosting.JavaScript v17.0.0
func (DistributedApplicationBuilder) AddNodeApp(
name string,
appDirectory string,
scriptPath string,
) NodeAppResource

Signature

methodAddNodeAppbuilder
Adds a node application to the application model. Node should be available on the PATH.
AddNodeApp(
name string,
appDirectory string,
scriptPath string,
) NodeAppResource
namestringThe name of the resource.
appDirectorystringThe path to the directory containing the node application.
scriptPathstringThe path to the script relative to the app directory to run.
NodeAppResource

The resource builder.

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

Applies to

This method applies to the following types:

typeDistributedApplicationBuilder