RedwoodSDK

Last updated Apr 23, 2026 In this guide, you will create a new RedwoodSDK ↗︎ application and deploy it to Cloudflare Workers.

RedwoodSDK is a framework for building server-side web applications on Cloudflare. It is a Vite plugin that provides SSR, React Server Components, Server Functions, and realtime capabilities.

Deploy a new RedwoodSDK application on Workers

  1. Create a new project.

Run the following command, replacing my-project-name with your desired project name:npmyarnpnpm

npx create-rwsdk my-project-name

yarn dlx create-rwsdk my-project-name

pnpx create-rwsdk my-project-name

  1. Change the directory.

sh cd my-project-name

  1. Install dependencies.npmyarnpnpmbun

npm install

yarn install

pnpm install

bun install

  1. Develop locally.

Run the following command in the project directory to start a local development server. RedwoodSDK is a Vite plugin, so you can use the same development workflow as any other Vite project:npmyarnpnpm

npm run dev

yarn run dev

pnpm run dev

Access the development server in your browser at http://localhost:5173, where you should see "Hello, World!" displayed on the page. 5. Add your first route.

The entry point of your application is src/worker.tsx. Open that file in your editor.

You will see the defineApp function, which handles requests by returning responses to the client:

```tsx import { defineApp } from "rwsdk/worker"; import { route, render } from "rwsdk/router";

import { Document } from "@/app/Document"; import { Home } from "@/app/pages/Home";

export default defineApp([ render(Document, [route("/", () => new Response("Hello, World!"))]), ]); ```

Add a /ping route handler:

```tsx import { defineApp } from "rwsdk/worker"; import { route, render } from "rwsdk/router";

export default defineApp([ render(Document, [ route("/", () => new Response("Hello, World!")), route("/ping", function () { return

Pong!

; }), ]), ]); ```

Navigate to http://localhost:5173/ping to see "Pong!" displayed on the page.

Routes can return JSX directly. RedwoodSDK has support for React Server Components, which renders JSX on the server and sends HTML to the client. 6. Deploy your project.

You can deploy your project to a *.workers.dev subdomain or a Custom Domain, either from your local machine or from any CI/CD system, including Cloudflare Workers CI/CD.

Use the following command to build and deploy. If you are using CI, make sure to update your deploy command configuration accordingly.npmyarnpnpm

npm run release

yarn run release

pnpm run release

The first time you run the command it might fail and ask you to create a workers.dev subdomain. Go to the dashboard and open the Workers menu. Opening the Workers landing page for the first time will create a workers.dev subdomain automatically.

Was this helpful?

YesNo

On this page

RedwoodSDK - 图1Docs

{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/workers/framework-guides/web-apps/redwoodsdk/#page","headline":"RedwoodSDK","description":"Create a RedwoodSDK application and deploy it to Cloudflare Workers.","url":"https://developers.cloudflare.com/workers/framework-guides/web-apps/redwoodsdk/","inLanguage":"en","image":"https://developers.cloudflare.com/workers/framework-guides/web-apps/redwoodsdk/og.png?v=806222694c01d46a","dateModified":"2026-04-23","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"},"keywords":["full-stack"]}


description: Create a SvelteKit application and deploy it to Cloudflare Workers with Workers Assets. title: SvelteKit image: https://developers.cloudflare.com/workers/framework-guides/web-apps/sveltekit/og.png?v=ca4adb487e3c7611


Skip to content

Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/workers/llms.txt
Use this file to discover all available pages before exploring further.