Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

JavaScriptAppResource.PublishAsNodeServer

Method
📦 Aspire.Hosting.JavaScript v17.0.0
type JavaScriptAppResource interface {
// ... omitted for brevity
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().

Defined on

This method is defined on the following type: