---
title: Worker Starter · Cloudflare Style Guide
description: Run different logic based on the URL and request method. Use this starter to Build REST APIs or applications that require routing logic.
lastUpdated: 2025-03-06T20:33:22.000Z
source_url:
  html: https://a74404c8.preview.developers.cloudflare.com/style-guide/components/worker-starter/index.md
  md: https://a74404c8.preview.developers.cloudflare.com/style-guide/components/worker-starter/
---

```mdx
import { WorkerStarter } from "~/components"


<WorkerStarter
    title="Router"
    repo="cloudflare/workers-sdk/templates/worker-router"
    description="Run different logic based on the URL and request method. Use this starter to Build REST APIs or applications that require routing logic."
/>
```

***

##### [Router](https://github.com/cloudflare/workers-sdk/templates/worker-router)

Run different logic based on the URL and request method. Use this starter to Build REST APIs or applications that require routing logic.

* npm

  ```sh
  npm create cloudflare@latest -- my-app --template cloudflare/workers-sdk/templates/worker-router
  ```

* pnpm

  ```sh
  pnpm create cloudflare@latest my-app --template cloudflare/workers-sdk/templates/worker-router
  ```

* yarn

  ```sh
  yarn create cloudflare my-app --template cloudflare/workers-sdk/templates/worker-router
  ```
