# PgWebContainerResource.withHostPort

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

Sets the host port for pgweb

## Definition

```typescript
interface PgWebContainerResource {
  // ... omitted for brevity
  withHostPort(port: number): PgWebContainerResource;
}
```

## Signature

```typescript
withHostPort(port: number): PgWebContainerResource
```

## Parameters

- `port` (`number`)

## Returns

[PgWebContainerResource](/reference/api/typescript/aspire.hosting.postgresql/pgwebcontainerresource.md) `builder`

## Defined on

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