addJavaScriptApp

Method
📦 Aspire.Hosting.JavaScript v17.0.0
interface IDistributedApplicationBuilder {
// ... omitted for brevity
addJavaScriptApp(
name: string,
appDirectory: string,
runScriptName?: string): JavaScriptAppResource;
}

Signature

methodaddJavaScriptAppbuilder
Adds a JavaScript application resource to the distributed application using the specified app directory and run script.
addJavaScriptApp(
name: string,
appDirectory: string,
runScriptName?: string): JavaScriptAppResource
namestringThe unique name of the JavaScript application resource. Cannot be null or empty.
appDirectorystringThe path to the directory containing the JavaScript application.
runScriptNamestringoptional= devThe name of the npm script to run when starting the application. Defaults to "dev". Cannot be null or empty.
JavaScriptAppResource

Applies to

This method applies to the following types: