Aspire.Hosting.JavaScript
Official
📦 Aspire.Hosting.JavaScriptv17.0.0Import path
apphost/modules/aspire35Functions
10Types
10 types, 35 functions and 6 members
Handles
Enums
Functions
DenoAppResource
method
WithDenoAllowbuilderGrants a Deno permission, optionally scoped to the supplied values.
WithDenoAllow(kind DenoPermissionKind, values []string) DenoAppResourcemethod
WithDenoAllowAllbuilderControls the blanket
-A /--allow-all grant.WithDenoAllowAll(options ...*WithDenoAllowAllOptions) DenoAppResourcemethod
WithDenoConfigbuilderSets
--config <file> (path to a deno.json /deno.jsonc ).WithDenoConfig(configFile string) DenoAppResourcemethod
WithDenoDenybuilderDenies a Deno permission, optionally scoped to the supplied values.
WithDenoDeny(kind DenoPermissionKind, values []string) DenoAppResourcemethod
WithDenoImportMapbuilderSets
--import-map <file> .WithDenoImportMap(importMapFile string) DenoAppResourcemethod
WithDenoInspectbuilderEnables a Deno inspector mode, optionally at
hostPort (for example 127.0.0.1:9229).WithDenoInspect(options ...*WithDenoInspectOptions) DenoAppResourcemethod
WithDenoLockbuilderSets
--lock <file> .WithDenoLock(lockFile string) DenoAppResourcemethod
WithDenoNodeModulesDirbuilderSets
--node-modules-dir , optionally with a mode emitted as --node-modules-dir=<mode> .WithDenoNodeModulesDir(options ...*WithDenoNodeModulesDirOptions) DenoAppResourcemethod
WithDenoNoLockbuilderSets
--no-lock , disabling lockfile use.WithDenoNoLock() DenoAppResourcemethod
WithDenoRunbuilderSelects the
deno run <entrypoint> mode (the default).WithDenoRun() DenoAppResourcemethod
WithDenoRuntimeArgsbuilderAppends raw runtime arguments injected verbatim BEFORE the entrypoint. This is the escape hatch that gives full parity with
AddExecutable("name", "deno", workdir, args...) for any flag not covered by a dedicated WithDeno* method.WithDenoRuntimeArgs(args []string) DenoAppResourcemethod
WithDenoScriptArgsbuilderAppends arguments passed to the script AFTER the entrypoint. Deno forwards everything after the entrypoint to the running program.
WithDenoScriptArgs(args []string) DenoAppResourcemethod
WithDenoServebuilderSelects the
deno serve <entrypoint> mode for serving an HTTP entrypoint.WithDenoServe() DenoAppResourcemethod
WithDenoTaskbuilderSelects the
deno task <taskName> mode, running a task defined in deno.json instead of a script entrypoint. Permissions are defined by the task itself and are not emitted for this mode.WithDenoTask(taskName string) DenoAppResourcemethod
WithDenoUnstablebuilderAdds one or more
--unstable-* flags. Each feature may be supplied bare (for example "kv", "worker-options" , "sloppy-imports" ) or fully qualified ("--unstable-kv" ).WithDenoUnstable(features []string) DenoAppResourcemethod
WithDenoWatchbuilderEnables
--watch (or --watch-hmr when hmr is true).WithDenoWatch(options ...*WithDenoWatchOptions) DenoAppResourceDistributedApplicationBuilder
method
AddBunAppbuilderAdds a Bun application to the application model. Bun should be available on the PATH.
AddBunApp(name string, appDirectory string, scriptPath string) BunAppResourcemethod
AddDenoAppbuilderAdds a Deno application to the application model. Deno should be available on the PATH.
AddDenoApp(name string, appDirectory string, scriptPath string) DenoAppResourcemethod
AddJavaScriptAppbuilderAdds a JavaScript application resource to the distributed application using the specified app directory and run script.
AddJavaScriptApp(name string, appDirectory string, options ...*AddJavaScriptAppOptions) JavaScriptAppResourcemethod
AddNextJsAppbuilderAdds a Next.js app to the distributed application builder.
AddNextJsApp(name string, appDirectory string, options ...*AddNextJsAppOptions) NextJsAppResourcemethod
AddNodeAppbuilderAdds a node application to the application model. Node should be available on the PATH.
AddNodeApp(name string, appDirectory string, scriptPath string) NodeAppResourcemethod
AddViteAppbuilderAdds a Vite app to the distributed application builder.
AddViteApp(name string, appDirectory string, options ...*AddViteAppOptions) ViteAppResourceJavaScriptAppResource
method
PublishAsNodeServerbuilderConfigures the JavaScript application to publish as a standalone Node.js server that runs a built artifact directly.
PublishAsNodeServer(entryPoint string, options ...*PublishAsNodeServerOptions) JavaScriptAppResourcemethod
PublishAsPackageScriptbuilderConfigures the JavaScript application to publish as a server that runs a package manager script at runtime.
PublishAsPackageScript(options ...*PublishAsPackageScriptOptions) JavaScriptAppResourcemethod
PublishAsStaticWebsitebuilderPublishes the JavaScript application as a standalone static website using YARP.
PublishAsStaticWebsite(options ...*PublishAsStaticWebsiteOptions) JavaScriptAppResourcemethod
WithBrowserDebuggerbuilderConfigures a browser debugger for the JavaScript application resource, enabling browser-based debugging through a child resource that launches when the parent application is ready.
WithBrowserDebugger(options ...*WithBrowserDebuggerOptions) JavaScriptAppResourcemethod
WithBuildScriptbuilderAdds a build script annotation to the resource builder using the specified command-line arguments.
WithBuildScript(scriptName string, options ...*WithBuildScriptOptions) JavaScriptAppResourcemethod
WithBunbuilderConfigures the JavaScript resource to use Bun as the package manager and optionally installs packages before the application starts.
WithBun(options ...*WithBunOptions) JavaScriptAppResourcemethod
WithDenobuilderConfigures the JavaScript resource to use Deno as the package manager.
WithDeno(options ...*WithDenoOptions) JavaScriptAppResourcemethod
WithNpmbuilderConfigures the Node.js resource to use npm as the package manager and optionally installs packages before the application starts.
WithNpm(options ...*WithNpmOptions) JavaScriptAppResourcemethod
WithPnpmbuilderConfigures the Node.js resource to use pnpm as the package manager and optionally installs packages before the application starts.
WithPnpm(options ...*WithPnpmOptions) JavaScriptAppResourcemethod
WithRunScriptbuilderAdds a run script annotation to the specified JavaScript application resource builder, specifying the script to execute and its arguments during run mode.
WithRunScript(scriptName string, options ...*WithRunScriptOptions) JavaScriptAppResourcemethod
WithYarnbuilderConfigures the Node.js resource to use yarn as the package manager and optionally installs packages before the application starts.
WithYarn(options ...*WithYarnOptions) JavaScriptAppResource