# Aspire.Hosting.JavaScript

- Module: `Aspire.Hosting.JavaScript`
- Version: `13.4.0`
- Source: [GitHub](https://github.com/microsoft/aspire)
- Functions: `17`
- Types: `5`

## Types

- [BunAppResource](/reference/api/typescript/aspire.hosting.javascript/bunappresource.md) -- `handle` - 0 members -- A resource that represents a Bun application.
- [JavaScriptAppResource](/reference/api/typescript/aspire.hosting.javascript/javascriptappresource.md) -- `handle` - 10 members -- A resource that represents a JavaScript application.
- [NextJsAppResource](/reference/api/typescript/aspire.hosting.javascript/nextjsappresource.md) -- `handle` - 1 members -- Represents a Next.js application resource.
- [NodeAppResource](/reference/api/typescript/aspire.hosting.javascript/nodeappresource.md) -- `handle` - 0 members -- A resource that represents a node application.
- [ViteAppResource](/reference/api/typescript/aspire.hosting.javascript/viteappresource.md) -- `handle` - 1 members -- Represents a Vite application resource that can be managed and executed within a Node.js environment.

## Functions

- [addBunApp](/reference/api/typescript/aspire.hosting.javascript/addbunapp.md) -- `method` -- Adds a Bun application to the application model. Bun should be available on the PATH.
- [addJavaScriptApp](/reference/api/typescript/aspire.hosting.javascript/addjavascriptapp.md) -- `method` -- Adds a JavaScript application resource to the distributed application using the specified app directory and run script.
- [addNextJsApp](/reference/api/typescript/aspire.hosting.javascript/addnextjsapp.md) -- `method` -- Adds a Next.js app to the distributed application builder.
- [addNodeApp](/reference/api/typescript/aspire.hosting.javascript/addnodeapp.md) -- `method` -- Adds a node application to the application model. Node should be available on the PATH.
- [addViteApp](/reference/api/typescript/aspire.hosting.javascript/addviteapp.md) -- `method` -- Adds a Vite app to the distributed application builder.
- [disableBuildValidation](/reference/api/typescript/aspire.hosting.javascript/disablebuildvalidation.md) -- `method` -- Disables deploy-time build validation checks for the Next.js application.
- [publishAsNodeServer](/reference/api/typescript/aspire.hosting.javascript/publishasnodeserver.md) -- `method` -- Configures the JavaScript application to publish as a standalone Node.js server that runs a built artifact directly.
- [publishAsPackageScript](/reference/api/typescript/aspire.hosting.javascript/publishaspackagescript.md) -- `method` -- Configures the JavaScript application to publish as a Node.js server that uses a `package.json` script at runtime.
- [publishAsStaticWebsite](/reference/api/typescript/aspire.hosting.javascript/publishasstaticwebsite.md) -- `method` -- Publishes the JavaScript application as a standalone static website using YARP.
- [withBrowserDebugger](/reference/api/typescript/aspire.hosting.javascript/withbrowserdebugger.md) -- `method` -- Configures a browser debugger for the JavaScript application resource, enabling browser-based debugging through a child resource that launches when the parent application is ready.
- [withBuildScript](/reference/api/typescript/aspire.hosting.javascript/withbuildscript.md) -- `method` -- Adds a build script annotation to the resource builder using the specified command-line arguments.
- [withBun](/reference/api/typescript/aspire.hosting.javascript/withbun.md) -- `method` -- Configures the JavaScript resource to use Bun as the package manager and optionally installs packages before the application starts.
- [withNpm](/reference/api/typescript/aspire.hosting.javascript/withnpm.md) -- `method` -- Configures the Node.js resource to use npm as the package manager and optionally installs packages before the application starts.
- [withPnpm](/reference/api/typescript/aspire.hosting.javascript/withpnpm.md) -- `method` -- Configures the Node.js resource to use pnpm as the package manager and optionally installs packages before the application starts.
- [withRunScript](/reference/api/typescript/aspire.hosting.javascript/withrunscript.md) -- `method` -- Adds a run script annotation to the specified JavaScript application resource builder, specifying the script to execute and its arguments during run mode.
- [withViteConfig](/reference/api/typescript/aspire.hosting.javascript/withviteconfig.md) -- `method` -- Configures the Vite app to use the specified Vite configuration file instead of the default resolution behavior.
- [withYarn](/reference/api/typescript/aspire.hosting.javascript/withyarn.md) -- `method` -- Configures the Node.js resource to use yarn as the package manager and optionally installs packages before the application starts.
