|
2 | 2 |
|
3 | 3 | This is the starter template for Workflows, a durable execution engine built on top of Cloudflare Workers.
|
4 | 4 |
|
5 |
| -Read the [announcement blog]() to learn more about what Workflows is and how to build durable, multi-step applications using the Workflows model. |
| 5 | +* Clone this repository to get started with Workflows |
| 6 | +* Read the [Workflows announcement blog](https://blog.cloudflare.com/building-workflows-durable-execution-on-workers/) to learn more about what Workflows is and how to build durable, multi-step applications using the Workflows model. |
| 7 | +* Review the [Workflows developer documentation](https://developers.cloudflare.com/workflows/) to dive deeper into the Workflows API and how it works. |
6 | 8 |
|
7 | 9 | ## Usage
|
8 | 10 |
|
9 | 11 | Visit the [get started guide](https://developers.cloudflare.com/workflows/get-started/guide/) for Workflows to create and deploy your first Workflow.
|
10 | 12 |
|
11 |
| -You can create a project using this template by using `npm create cloudflare@latest`: |
| 13 | +You can create a project using this template by using `npm create cloudflare@latest`: |
12 | 14 |
|
13 | 15 | ```sh
|
14 |
| -npx create cloudflare@latest workflows-starter -- --template "cloudflare:workflows-starter" |
| 16 | +npm create cloudflare@latest workflows-starter -- --template "cloudflare/workflows-starter" |
| 17 | +``` |
| 18 | + |
| 19 | +This will automatically clone this repository, install the dependencies, and prompt you to optionally deploy: |
| 20 | + |
| 21 | +```sh |
| 22 | +➜ npm create cloudflare@latest workflows-tutorial -- --template="cloudflare/workflows-starter" |
| 23 | + |
| 24 | +────────────────────────────────────────────────────────────────────────────────────────────────────────── |
| 25 | +╭ Create an application with Cloudflare Step 1 of 3 |
| 26 | +│ |
| 27 | +├ In which directory do you want to create your application? |
| 28 | +│ dir ./workflows-tutorial |
| 29 | +│ |
| 30 | +├ What would you like to start with? |
| 31 | +│ category Template from a GitHub repo |
| 32 | +│ |
| 33 | +├ What's the url of git repo containing the template you'd like to use? |
| 34 | +│ repository cloudflare/workflows-starter |
| 35 | +│ |
| 36 | +├ Cloning template from: cloudflare/workflows-starter |
| 37 | +│ |
| 38 | +├ template cloned and validated |
| 39 | +│ |
| 40 | +├ Copying template files |
| 41 | +│ files copied to project directory |
| 42 | +│ |
| 43 | +├ Installing dependencies |
| 44 | +│ installed via `npm install` |
| 45 | +│ |
| 46 | +╰ Application created |
| 47 | + |
| 48 | +╭ Configuring your application for Cloudflare Step 2 of 3 |
| 49 | +│ |
| 50 | +├ Installing @cloudflare/workers-types |
| 51 | +│ installed via npm |
| 52 | +│ |
| 53 | +├ Adding latest types to `tsconfig.json` |
| 54 | +│ added @cloudflare/workers-types/2023-07-01 |
| 55 | +│ |
| 56 | +├ Do you want to use git for version control? |
| 57 | +│ yes git |
| 58 | +│ |
| 59 | +├ Initializing git repo |
| 60 | +│ initialized git |
| 61 | +│ |
| 62 | +├ Committing new files |
| 63 | +│ git commit |
| 64 | +│ |
| 65 | +╰ Application configured |
| 66 | + |
| 67 | +╭ Deploy with Cloudflare Step 3 of 3 |
| 68 | +│ |
| 69 | +├ Do you want to deploy your application? |
| 70 | +│ no deploy via `npm run deploy` |
| 71 | +│ |
| 72 | +╰ Done |
| 73 | + |
| 74 | +──────────────────────────────────────────────────────────── |
| 75 | +🎉 SUCCESS Application created successfully! |
15 | 76 | ```
|
16 | 77 |
|
17 | 78 | The [Workflows documentation](https://developers.cloudflare.com/workflows/) contains examples, the API reference, and architecture guidance.
|
|
0 commit comments