Skip to content

Latest commit

Β 

History

History
87 lines (54 loc) Β· 3.04 KB

File metadata and controls

87 lines (54 loc) Β· 3.04 KB

πŸš€ 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! πŸŽ‰

Using AI coding tools

If you use Claude Code or Codex, then the Restate plugin will automatically be installed. For Cursor, consult the skills repo README.

Plugin repo: https://github.com/restatedev/skills/tree/main