# PostgresServerResource.withInitFiles

- Module: [Aspire.Hosting.PostgreSQL](/reference/api/typescript/aspire.hosting.postgresql.md)
- Defined on: [PostgresServerResource](/reference/api/typescript/aspire.hosting.postgresql/postgresserverresource.md)
- Version: `13.4.0`
- Kind: `method`

Copies init files to a PostgreSQL container resource.

## Definition

```typescript
interface PostgresServerResource {
  // ... omitted for brevity
  withInitFiles(source: string): PostgresServerResource;
}
```

## Signature

```typescript
withInitFiles(source: string): PostgresServerResource
```

## Parameters

- `source` (`string`)

## Returns

[PostgresServerResource](/reference/api/typescript/aspire.hosting.postgresql/postgresserverresource.md) `builder`

## Defined on

- [PostgresServerResource](/reference/api/typescript/aspire.hosting.postgresql/postgresserverresource.md) -- `handle`
