Skip to content
Docs Try Aspire

JavaScriptAppResource

Handle
📦 Aspire.Hosting.JavaScript v13.2.0
interface JavaScriptAppResource
extends IComputeResource,
IResource,
IResourceWithArgs,
IResourceWithEndpoints,
IResourceWithEnvironment,
IResourceWithProbes,
IResourceWithWaitSupport,
IResourceWithContainerFiles,
IResourceWithServiceDiscovery {
readonly command: string;
readonly name: string;
readonly workingDirectory: string;
withBrowserDebugger(browser?: string): JavaScriptAppResource;
withBuildScript(
scriptName: string,
args?: string[]): JavaScriptAppResource;
withBun(
install?: boolean,
installArgs?: string[]): JavaScriptAppResource;
withNpm(
install?: boolean,
installCommand?: string,
installArgs?: string[]): JavaScriptAppResource;
withPnpm(
install?: boolean,
installArgs?: string[]): JavaScriptAppResource;
withRunScript(
scriptName: string,
args?: string[]): JavaScriptAppResource;
withYarn(
install?: boolean,
installArgs?: string[]): JavaScriptAppResource;
}

Properties

property command string get
Gets the Command property
property name string get
Gets the Name property
property workingDirectory string get
Gets the WorkingDirectory property

Methods

method withBrowserDebugger builder
Configures a browser debugger for the JavaScript application
withBrowserDebugger(browser?: string): JavaScriptAppResource
browser string optional = msedge
JavaScriptAppResource
method withBuildScript builder
Specifies an npm script to run before starting the application
withBuildScript(
scriptName: string,
args?: string[]): JavaScriptAppResource
scriptName string
args string[] optional
JavaScriptAppResource
method withBun builder
Configures Bun as the package manager
withBun(
install?: boolean,
installArgs?: string[]): JavaScriptAppResource
install boolean optional = True
installArgs string[] optional
JavaScriptAppResource
method withNpm builder
Configures npm as the package manager
withNpm(
install?: boolean,
installCommand?: string,
installArgs?: string[]): JavaScriptAppResource
install boolean optional = True
installCommand string optional
installArgs string[] optional
JavaScriptAppResource
method withPnpm builder
Configures pnpm as the package manager
withPnpm(
install?: boolean,
installArgs?: string[]): JavaScriptAppResource
install boolean optional = True
installArgs string[] optional
JavaScriptAppResource
method withRunScript builder
Specifies an npm script to run during development
withRunScript(
scriptName: string,
args?: string[]): JavaScriptAppResource
scriptName string
args string[] optional
JavaScriptAppResource
method withYarn builder
Configures yarn as the package manager
withYarn(
install?: boolean,
installArgs?: string[]): JavaScriptAppResource
install boolean optional = True
installArgs string[] optional
JavaScriptAppResource