AddSurrealServer

Method
📦 CommunityToolkit.Aspire.Hosting.SurrealDb v13.6.1
func (DistributedApplicationBuilder) AddSurrealServer(
name string,
options ...*AddSurrealServerOptions,
) SurrealDbServerResource

Signature

methodAddSurrealServerbuilder
Adds a SurrealDB resource to the application model. A container is used for local development. The default image is and the tag is .
AddSurrealServer(
name string,
options ...*AddSurrealServerOptions,
) SurrealDbServerResource
namestringThe name of the resource. This name will be used as the connection string name when referenced in a dependency.
options...*AddSurrealServerOptionsOptional settings, described under Options.

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

UserName*ParameterResourceThe parameter used to provide the administrator username for the SurrealDB resource.
Password*ParameterResourceThe parameter used to provide the administrator password for the SurrealDB resource. If null a random password will be generated.
Port*float64The host port for the SurrealDB instance.
Path*stringSets the path for storing data. If no argument is given, the default of memory for non-persistent storage in memory is assumed.
SurrealDbServerResource

A reference to the IResourceBuilder.

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

Applies to

This method applies to the following types:

typeDistributedApplicationBuilder