JavaScriptAppResource.publishAsPackageScript

Method
📦 Aspire.Hosting.JavaScript v17.0.0
interface JavaScriptAppResource {
// ... omitted for brevity
publishAsPackageScript(
scriptName?: string,
runScriptArguments?: string): JavaScriptAppResource;
}

Signature

methodpublishAsPackageScriptbuilder
Configures the JavaScript application to publish as a server that runs a package manager script at runtime.
publishAsPackageScript(
scriptName?: string,
runScriptArguments?: string): JavaScriptAppResource
scriptNamestringoptional= startThe name of the script to run in the published container. For Node.js and Bun applications this is a `package.json` script; for Deno applications it is a task defined in `deno.json`. For example, `start` invokes the configured package manager's run command for the `start` script, such as `npm run start`, `pnpm run start`, `yarn run start`, `bun run start`, or `deno task start`.
runScriptArgumentsstringoptionalOptional arguments appended after the script name at runtime, such as `-- --port "$PORT"`.
JavaScriptAppResource

Defined on

This method is defined on the following type: