Skip to content

restatedev/cloudflare-workers-template

Repository files navigation

🚀 Restate + Cloudflare Workers Template

Welcome to the Restate TypeScript + Cloudflare Workers template! ✨

🏁 Getting Started

Prerequisites

  • 📦 Node.js 20+ installed
  • 🔧 npm or yarn package manager
  • 🌐 Cloudflare account (for deployment)

🛠️ Local Development

Install dependencies:

npm install

Launch the local Restate server:

npx @restatedev/restate-server

Start the Cloudflare Workers development server:

npm run dev

Connect your local service to Restate:

npx @restatedev/restate dep add http://localhost:9080 --use-http1.1

💡 Note: The --use-http1.1 flag is required only when running locally.

Iterate! 🔧

🚀 Deploy

📦 On Restate Cloud

This template includes a GitHub Actions workflow setup for automated deployment.

Create your Cloudflare Worker project. You can do so by running:

npx wrangler deploy

Add the following to Github Actions repository secrets:

Once the repo is set up, just push to the main branch and you'll get your services updated.

Check the workflow deploy.yml for more details.

🔧 Manual Deployment

For more info on how to deploy manually, check:

🎯 Next Steps

Happy building! 🎉

About

Restate + Cloudflare Workers template

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published