次の方法で共有


NodeAppHostingExtension.AddNodeApp Method

Definition

Adds a node application to the application model. Node should available on the PATH.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.NodeAppResource> AddNodeApp (this Aspire.Hosting.IDistributedApplicationBuilder builder, string name, string scriptPath, string? workingDirectory = default, string[]? args = default);
static member AddNodeApp : Aspire.Hosting.IDistributedApplicationBuilder * string * string * string * string[] -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.NodeAppResource>
<Extension()>
Public Function AddNodeApp (builder As IDistributedApplicationBuilder, name As String, scriptPath As String, Optional workingDirectory As String = Nothing, Optional args As String() = Nothing) As IResourceBuilder(Of NodeAppResource)

Parameters

name
String

The name of the resource.

scriptPath
String

The path to the script that Node will execute.

workingDirectory
String

The working directory to use for the command. If null, the working directory of the current process is used.

args
String[]

The arguments to pass to the command.

Returns

A reference to the IResourceBuilder<T>.

Applies to