Skip to content
Docs Try Aspire
Docs Try

Aspire.Hosting.JavaScript

Official
📦 Aspire.Hosting.JavaScript v13.3.0
16 Functions
4 Types

Types

Functions

method addJavaScriptApp builder
Adds a JavaScript application resource
addJavaScriptApp(name: string, appDirectory: string, runScriptName?: string): JavaScriptAppResource
method addNextJsApp builder
Adds a Next.js application resource
addNextJsApp(name: string, appDirectory: string, runScriptName?: string): NextJsAppResource
method addNodeApp builder
Adds a Node.js application resource
addNodeApp(name: string, appDirectory: string, scriptPath: string): NodeAppResource
method addViteApp builder
Adds a Vite application resource
addViteApp(name: string, appDirectory: string, runScriptName?: string): ViteAppResource
method disableBuildValidation builder
Disables deploy-time build validation checks for the Next.js application.
disableBuildValidation(): NextJsAppResource
method publishAsNodeServer builder
Publishes the JavaScript application as a standalone Node.js server that runs a built artifact directly.
publishAsNodeServer(entryPoint: string, outputPath?: string): JavaScriptAppResource
method publishAsNpmScript builder
Publishes the JavaScript application as a Node.js server that uses a package manager script at runtime.
publishAsNpmScript(startScriptName?: string, runScriptArguments?: string): JavaScriptAppResource
method publishAsStaticWebsite builder
Publishes the JavaScript application as a standalone static website using YARP.
publishAsStaticWebsite(apiPath?: string, apiTarget?: IResourceWithServiceDiscovery, outputPath?: string, stripPrefix?: boolean, targetEndpointName?: string): JavaScriptAppResource
method withBrowserDebugger builder
Configures a browser debugger for the JavaScript application
withBrowserDebugger(browser?: string): JavaScriptAppResource
method withBuildScript builder
Specifies an npm script to run before starting the application
withBuildScript(scriptName: string, args?: string[]): JavaScriptAppResource
method withBun builder
Configures Bun as the package manager
withBun(install?: boolean, installArgs?: string[]): JavaScriptAppResource
method withNpm builder
Configures npm as the package manager
withNpm(install?: boolean, installCommand?: string, installArgs?: string[]): JavaScriptAppResource
method withPnpm builder
Configures pnpm as the package manager
withPnpm(install?: boolean, installArgs?: string[]): JavaScriptAppResource
method withRunScript builder
Specifies an npm script to run during development
withRunScript(scriptName: string, args?: string[]): JavaScriptAppResource
method withViteConfig builder
Configures a custom Vite configuration file
withViteConfig(configPath: string): ViteAppResource
method withYarn builder
Configures yarn as the package manager
withYarn(install?: boolean, installArgs?: string[]): JavaScriptAppResource