Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

AddNextJsApp

Method
📦 Aspire.Hosting.JavaScript v17.0.0
func (DistributedApplicationBuilder) AddNextJsApp(
name string,
appDirectory string,
options ...*AddNextJsAppOptions,
) NextJsAppResource

Signature

methodAddNextJsAppbuilder
Adds a Next.js app to the distributed application builder.
AddNextJsApp(
name string,
appDirectory string,
options ...*AddNextJsAppOptions,
) NextJsAppResource
namestringThe name of the Next.js app.
appDirectorystringThe path to the directory containing the Next.js app.
options...*AddNextJsAppOptionsOptional settings, described under Options.

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

RunScriptName*stringThe name of the script that runs the Next.js dev server. Defaults to "dev".
NextJsAppResource

The resource builder.

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

Applies to

This method applies to the following types:

typeDistributedApplicationBuilder