Watch Aspire live streamsDocsTry Aspire
Method
📦 Aspire.Hosting.JavaScript v17.0.0
interface IDistributedApplicationBuilder {
// ... omitted for brevity
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

Applies to

This method applies to the following types: