***

title: run
slug: /reference/typescript/agents/swml-service/run
description: Start the HTTP server.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

Start the HTTP server to serve the SWML document.

## **Parameters**

<ParamField path="host" type="string" default="0.0.0.0" toc={true}>
  Hostname to bind to.
</ParamField>

<ParamField path="port" type="number" default="3000" toc={true}>
  Port number to listen on. Falls back to the `PORT` environment variable.
</ParamField>

## **Returns**

`Promise<void>`

## **Example**

```typescript {8}
import { SWMLService } from '@signalwire/sdk';

const service = new SWMLService({ name: 'my-ivr', route: '/ivr' });
service.addVerb('answer', {});
service.addVerb('play', { url: 'https://example.com/greeting.mp3' });
service.addVerb('hangup', {});

await service.run('0.0.0.0', 8080);
```