# addLogto

- Module: [CommunityToolkit.Aspire.Hosting.Logto](/reference/api/typescript/communitytoolkit.aspire.hosting.logto.md)
- Version: `13.5.0`
- Kind: `method`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/tree/4ff8268fbd97ddd23cb73dc8eff9cc92718156d1)

Adds a Logto resource to the Aspire distributed application by configuring it with the specified name, associated PostgreSQL server resource, and database name.

## Definition

```typescript
interface IDistributedApplicationBuilder {
  // ... omitted for brevity
  addLogto(
    name: string,
    postgres: PostgresServerResource,
    databaseName?: string,
    port?: number,
    adminPort?: number): LogtoResource
}
```

## Parameters

- `name` (`string`)
- `postgres` (`PostgresServerResource`)
- `databaseName` (`string`) `optional` `= logto_db`
- `port` (`number`) `optional`
- `adminPort` (`number`) `optional`

## Returns

[LogtoResource](/reference/api/typescript/communitytoolkit.aspire.hosting.logto/logtoresource.md) `builder`

## Applies to

- [IDistributedApplicationBuilder](/reference/api/typescript/communitytoolkit.aspire.hosting.logto/idistributedapplicationbuilder.md)
