Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

PublishAsNodeServer

Method
📦 Aspire.Hosting.JavaScript v17.0.0
func (JavaScriptAppResource) PublishAsNodeServer(
entryPoint string,
options ...*PublishAsNodeServerOptions,
) JavaScriptAppResource

Signature

methodPublishAsNodeServerbuilder
Configures the JavaScript application to publish as a standalone Node.js server that runs a built artifact directly.
PublishAsNodeServer(
entryPoint string,
options ...*PublishAsNodeServerOptions,
) JavaScriptAppResource
entryPointstringThe relative path to the Node.js entry point to execute in the published container after the build completes, such as .output/server/index.mjs or build/index.js.
options...*PublishAsNodeServerOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*PublishAsNodeServerOptions argument.

OutputPath*stringThe relative path containing the built runtime files to copy into the published container. Defaults to the application root.
JavaScriptAppResource

The updated resource builder.

Returns a handle; failures surface later via Err().

Applies to

This method applies to the following types: