Skip to content

Commit

Permalink
Add README
Browse files Browse the repository at this point in the history
  • Loading branch information
jackkleeman committed Jun 24, 2024
1 parent 6ca5d02 commit e09bc6a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
13 changes: 13 additions & 0 deletions templates/cloudflare-worker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Hello world - Cloudflare workers + Typescript example

Sample project configuration of a Restate service using the TypeScript SDK and
Cloudflare Workers.

Have a look at the [TypeScript Quickstart guide](https://docs.restate.dev/get_started/quickstart?sdk=ts) for more information about the SDK.

You can run locally with `npm run dev` and register to Restate with
`restate dep add http://localhost:9080 --use-http1.1`. `--use-http1.1` is needed
with the local Workers dev server, as it does not expose HTTP2.

You can deploy to cloudflare with `npm run deploy` and register to Restate with
`restate dep add https://restate-cloudflare-worker.<your-subdomain>.workers.dev`.
6 changes: 3 additions & 3 deletions templates/cloudflare-worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"version": "0.0.1",
"scripts": {
"deploy": "wrangler deploy",
"dev": "wrangler dev",
"start": "wrangler dev",
"dev": "wrangler dev --9080",
"start": "wrangler dev --port 9080",
"format": "prettier --write \"src/*.+(js|ts|json)\""
},
"dependencies": {
"@restatedev/restate-sdk": "dev"
"@restatedev/restate-sdk": "^1.0.1"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20240605.0",
Expand Down

0 comments on commit e09bc6a

Please sign in to comment.