NodeAppHostingExtension.AddNodeApp Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- builder
- IDistributedApplicationBuilder
The IDistributedApplicationBuilder to add the resource to.
- 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>.