JavaScriptAppResource
Handle
interface JavaScriptAppResource extends IComputeResource, IResource, IResourceWithArgs, IResourceWithEndpoints, IResourceWithEnvironment, IResourceWithProbes, IResourceWithWaitSupport, IResourceWithContainerFiles, IResourceWithServiceDiscovery { publishAsNodeServer( entryPoint: string, outputPath?: string): JavaScriptAppResource; publishAsNpmScript( startScriptName?: string, runScriptArguments?: string): JavaScriptAppResource; publishAsStaticWebsite( apiPath?: string, apiTarget?: IResourceWithServiceDiscovery, outputPath?: string, stripPrefix?: boolean, targetEndpointName?: string): JavaScriptAppResource; 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;} 10 members
Methods
Publishes the JavaScript application as a standalone Node.js server that runs a built artifact directly.
publishAsNodeServer( entryPoint: string, outputPath?: string): JavaScriptAppResourceParameters
entryPoint string outputPath string optional = . Returns
JavaScriptAppResource Publishes the JavaScript application as a Node.js server that uses a package manager script at runtime.
publishAsNpmScript( startScriptName?: string, runScriptArguments?: string): JavaScriptAppResourceParameters
startScriptName string optional = start runScriptArguments string optional Returns
JavaScriptAppResource Publishes the JavaScript application as a standalone static website using YARP.
publishAsStaticWebsite( apiPath?: string, apiTarget?: IResourceWithServiceDiscovery, outputPath?: string, stripPrefix?: boolean, targetEndpointName?: string): JavaScriptAppResourceParameters
apiPath string optional apiTarget IResourceWithServiceDiscovery optional outputPath string optional = dist stripPrefix boolean optional = False targetEndpointName string optional Returns
JavaScriptAppResource Configures a browser debugger for the JavaScript application
withBrowserDebugger(browser?: string): JavaScriptAppResourceParameters
browser string optional = msedge Returns
JavaScriptAppResource Specifies an npm script to run before starting the application
withBuildScript( scriptName: string, args?: string[]): JavaScriptAppResourceParameters
scriptName string args string[] optional Returns
JavaScriptAppResource Configures Bun as the package manager
withBun( install?: boolean, installArgs?: string[]): JavaScriptAppResourceParameters
install boolean optional = True installArgs string[] optional Returns
JavaScriptAppResource Configures npm as the package manager
withNpm( install?: boolean, installCommand?: string, installArgs?: string[]): JavaScriptAppResourceParameters
install boolean optional = True installCommand string optional installArgs string[] optional Returns
JavaScriptAppResource Configures pnpm as the package manager
withPnpm( install?: boolean, installArgs?: string[]): JavaScriptAppResourceParameters
install boolean optional = True installArgs string[] optional Returns
JavaScriptAppResource Specifies an npm script to run during development
withRunScript( scriptName: string, args?: string[]): JavaScriptAppResourceParameters
scriptName string args string[] optional Returns
JavaScriptAppResource Configures yarn as the package manager
withYarn( install?: boolean, installArgs?: string[]): JavaScriptAppResourceParameters
install boolean optional = True installArgs string[] optional Returns
JavaScriptAppResource