> This page is for Server SDKs.

> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes.

# removeDirectory

> Stop serving a directory at a URL route prefix.

Stop serving a directory. The route stops responding at once, including on a running service.

## Parameters

**`route`** `string` — required

The URL route prefix to remove.

---

## Returns

`void`

## Example

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

const web = new WebService({
  directories: { '/audio': './public/audio' },
  basicAuth: ['audio', process.env['AUDIO_PASSWORD'] ?? ''],
});

await web.start();

// Later, stop serving the audio directory.
web.removeDirectory('/audio');
```