# RavenDBServerResource

- Module: [CommunityToolkit.Aspire.Hosting.RavenDB](/reference/api/go/communitytoolkit.aspire.hosting.ravendb.md)
- Version: `13.6.1`
- Kind: `handle`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/tree/d9c2addac6f527ef2e33712d290b84574b455a3b)

A resource that represents a RavenDB container.

## Definition

```go
type RavenDBServerResource interface {
    ExpressionValue
    IComputeResource
    Resource
    ResourceWithArgs
    ResourceWithConnectionString
    ResourceWithEndpoints
    ResourceWithEnvironment
    ResourceWithWaitSupport
}
```

## Embeds

- `ExpressionValue`
- `IComputeResource`
- `Resource`
- `ResourceWithArgs`
- `ResourceWithConnectionString`
- `ResourceWithEndpoints`
- `ResourceWithEnvironment`
- `ResourceWithWaitSupport`

## Properties

- `ConnectionStringExpression`: `*ReferenceExpression` `get` -- Gets the connection string expression for the RavenDB server, formatted as "http(s)://{Host}:{Port}" depending on the security setting.
- `Databases`: `map[string]string` `get` -- Gets a read-only dictionary of databases associated with this server resource. The key represents the resource name, and the value represents the database name.
- `Host`: `EndpointReferenceExpression` `get` -- Gets the host endpoint reference for this resource.
- `Port`: `EndpointReferenceExpression` `get` -- Gets the port endpoint reference for this resource.
- `PrimaryEndpoint`: `EndpointReference` `get` -- Gets the primary endpoint for the RavenDB server.
- `TcpEndpoint`: `EndpointReference` `get` -- Gets the TCP endpoint for the RavenDB server.
- `UriExpression`: `*ReferenceExpression` `get` -- Gets the connection URI expression for the RavenDB server.

## Methods

- [AddDatabase](/reference/api/go/communitytoolkit.aspire.hosting.ravendb/ravendbserverresource/adddatabase.md) -- `method` -- Adds a database resource to an existing RavenDB server resource.
  ```go
  AddDatabase(name string, options ...*AddDatabaseOptions) RavenDBDatabaseResource
  ```
- [WithDataBindMount](/reference/api/go/communitytoolkit.aspire.hosting.ravendb/ravendbserverresource/withdatabindmount.md) -- `method` -- Adds a bind mount for the data folder to a RavenDB container resource.
  ```go
  WithDataBindMount(source string, options ...*WithDataBindMountOptions) RavenDBServerResource
  ```
- [WithDataVolume](/reference/api/go/communitytoolkit.aspire.hosting.ravendb/ravendbserverresource/withdatavolume.md) -- `method` -- Adds a named volume for the data folder to a RavenDB container resource.
  ```go
  WithDataVolume(options ...*WithDataVolumeOptions) RavenDBServerResource
  ```
- [WithLogBindMount](/reference/api/go/communitytoolkit.aspire.hosting.ravendb/ravendbserverresource/withlogbindmount.md) -- `method` -- Adds a bind mount for the logs folder to a RavenDB container resource.
  ```go
  WithLogBindMount(source string, options ...*WithLogBindMountOptions) RavenDBServerResource
  ```
- [WithLogVolume](/reference/api/go/communitytoolkit.aspire.hosting.ravendb/ravendbserverresource/withlogvolume.md) -- `method` -- Adds a named volume for the logs folder to a RavenDB container resource.
  ```go
  WithLogVolume(options ...*WithLogVolumeOptions) RavenDBServerResource
  ```
