Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/WorkerStarter.astro
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ const link = `https://github.com/${repo}`;
<p>{description}</p>
<PackageManagers
type="create"
pkg="cloudflare@latest my-app"
args=`--template ${repo}`
pkg="cloudflare@latest"
args=`my-app --template ${repo}`
/>
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ To use `create-cloudflare` to create a new Docusaurus project, run the following

<PackageManagers
type="create"
pkg="cloudflare@latest my-docusaurus-app"
args="--framework=docusaurus --platform=pages"
pkg="cloudflare@latest"
args="my-docusaurus-app --framework=docusaurus --platform=pages"
/>

`create-cloudflare` will install additional dependencies, including the [Wrangler](/workers/wrangler/install-and-update/#check-your-wrangler-version) CLI and any necessary adapters, and ask you setup questions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ The [`create-cloudflare` CLI (C3)](/pages/get-started/c3/) will configure your N

<PackageManagers
type="create"
pkg="cloudflare@latest my-nuxt-app"
args="--framework=nuxt --platform=pages"
pkg="cloudflare@latest"
args="my-nuxt-app --framework=nuxt --platform=pages"
/>

C3 will ask you a series of setup questions and create a new project with [`nuxi` (the official Nuxt CLI)](https://github.com/nuxt/cli). C3 will also install the necessary adapters along with the [Wrangler CLI](/workers/wrangler/install-and-update/#check-your-wrangler-version).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ To use `create-cloudflare` to create a new Qwik project, run the following comma

<PackageManagers
type="create"
pkg="cloudflare@latest my-qwik-app"
args="--framework=qwik --platform=pages"
pkg="cloudflare@latest"
args="my-qwik-app --framework=qwik --platform=pages"
/>

`create-cloudflare` will install additional dependencies, including the [Wrangler CLI](/workers/wrangler/install-and-update/#check-your-wrangler-version) and any necessary adapters, and ask you setup questions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ To use `create-cloudflare` to create a new React project, run the following comm

<PackageManagers
type="create"
pkg="cloudflare@latest my-react-app"
args="--framework=react --platform=pages"
pkg="cloudflare@latest"
args="my-react-app --framework=react --platform=pages"
/>

`create-cloudflare` will install dependencies, including the [Wrangler](/workers/wrangler/install-and-update/#check-your-wrangler-version) CLI and the Cloudflare Pages adapter, and ask you setup questions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ To use `create-cloudflare` to create a new Remix project, run the following comm

<PackageManagers
type="create"
pkg="cloudflare@latest my-remix-app"
args="--framework=remix --platform=pages"
pkg="cloudflare@latest"
args="my-remix-app --framework=remix --platform=pages"
/>

`create-cloudflare` will install additional dependencies, including the [Wrangler](/workers/wrangler/install-and-update/#check-your-wrangler-version) CLI and any necessary adapters, and ask you setup questions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ To use `create-cloudflare` to create a new Svelte project, run the following com

<PackageManagers
type="create"
pkg="cloudflare@latest my-svelte-app"
args="--framework=svelte --platform=pages"
pkg="cloudflare@latest"
args="my-svelte-app --framework=svelte --platform=pages"
/>

SvelteKit will prompt you for customization choices. For the template option, choose one of the application/project options. The remaining answers will not affect the rest of this guide. Choose the options that suit your project.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ To use `create-cloudflare` to create a new Vue project, run the following comman

<PackageManagers
type="create"
pkg="cloudflare@latest my-vue-app "
args="--framework=vue --platform=pages"
pkg="cloudflare@latest"
args="my-vue-app --framework=vue --platform=pages"
/>

<Render file="tutorials-before-you-start" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ The easiest way to create a new Analog project and deploy to Cloudflare Pages is

<PackageManagers
type="create"
pkg="cloudflare@latest my-analog-app"
args="--framework=analog --platform=pages"
pkg="cloudflare@latest"
args="my-analog-app --framework=analog --platform=pages"
/>

C3 will walk you through the setup process and create a new project using `create-analog`, the official Analog creation tool. It will also install the necessary adapters along with the [Wrangler CLI](/workers/wrangler/install-and-update/#check-your-wrangler-version).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ To use `create-cloudflare` to create a new Angular project, run the following co

<PackageManagers
type="create"
pkg="cloudflare@latest my-angular-app"
args="--framework=angular --platform=pages"
pkg="cloudflare@latest"
args="my-angular-app --framework=angular --platform=pages"
/>

`create-cloudflare` will install dependencies, including the [Wrangler](/workers/wrangler/install-and-update/#check-your-wrangler-version) CLI and the Cloudflare Pages adapter, and ask you setup questions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ To use `create-cloudflare` to create a new Astro project, run the following comm

<PackageManagers
type="create"
pkg="cloudflare@latest my-astro-app"
args="--framework=astro --platform=pages"
pkg="cloudflare@latest"
args="my-astro-app --framework=astro --platform=pages"
/>

Astro will ask:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ To create a new Next.js app, pre-configured to run on Cloudflare, run:

<PackageManagers
type="create"
pkg="cloudflare@latest my-next-app"
args="--framework=next --platform=pages"
pkg="cloudflare@latest"
args="my-next-app --framework=next --platform=pages"
/>

For more guidance on developing your app, refer to [Bindings](/pages/framework-guides/nextjs/ssr/bindings/) or the [Next.js documentation](https://nextjs.org).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ To continue, you will need:

Create a new Worker project using the `c3` CLI with the `nuxt` framework preset.

<PackageManagers type="create" pkg="cloudflare@latest" args={"voice-notes --framework=nuxt --experimental"} />
<PackageManagers type="create" pkg="cloudflare@latest" args="voice-notes --framework=nuxt" />

### Install additional dependencies

Expand Down Expand Up @@ -156,29 +156,7 @@ Before uploading the audio recordings to `R2`, you need to create a bucket first

Create an `R2` bucket.

<Tabs>
<TabItem label="npm" icon="seti:npm">

```sh
npx wrangler r2 bucket create <BUCKET_NAME>
```

</TabItem>
<TabItem label="yarn" icon="seti:yarn">

```sh
yarn dlx wrangler r2 bucket create <BUCKET_NAME>
```

</TabItem>
<TabItem label="pnpm" icon="pnpm">

```sh
pnpm dlx wrangler r2 bucket create <BUCKET_NAME>
```

</TabItem>
</Tabs>
<PackageManagers type="exec" pkg="wrangler" args="r2 bucket create <BUCKET_NAME>" />

Add the storage binding to your Wrangler file.

Expand Down Expand Up @@ -229,29 +207,7 @@ Before creating the endpoint, you will need to perform steps similar to those fo

Create a `D1` database.

<Tabs>
<TabItem label="npm" icon="seti:npm">

```sh
npx wrangler d1 create <DB_NAME>
```

</TabItem>
<TabItem label="yarn" icon="seti:yarn">

```sh
yarn dlx wrangler d1 create <DB_NAME>
```

</TabItem>
<TabItem label="pnpm" icon="pnpm">

```sh
pnpm dlx wrangler d1 create <DB_NAME>
```

</TabItem>
</Tabs>
<PackageManagers type="exec" pkg="wrangler" args="d1 create <DB_NAME>" />

Add the D1 bindings to the Wrangler file. You can get the `DB_ID` from the output of the `d1 create` command.

Expand All @@ -266,29 +222,7 @@ As before, rerun the `cf-typegen` command to generate the types.

Next, create a DB migration.

<Tabs>
<TabItem label="npm" icon="seti:npm">

```sh
npx wrangler d1 migrations create <DB_NAME> "create notes table"
```

</TabItem>
<TabItem label="yarn" icon="seti:yarn">

```sh
yarn dlx wrangler d1 migrations create <DB_NAME> "create notes table"
```

</TabItem>
<TabItem label="pnpm" icon="pnpm">

```sh
pnpm dlx wrangler d1 migrations create <DB_NAME> "create notes table"
```

</TabItem>
</Tabs>
<PackageManagers type="exec" pkg="wrangler" args={`d1 migrations create <DB_NAME> "create notes table"`} />

This will create a new `migrations` folder in the project's root directory, and add an empty `0001_create_notes_table.sql` file to it. Replace the contents of this file with the code below.

Expand All @@ -304,29 +238,7 @@ CREATE TABLE IF NOT EXISTS notes (

And then apply this migration to create the `notes` table.

<Tabs>
<TabItem label="npm" icon="seti:npm">

```sh
npx wrangler d1 migrations apply <DB_NAME>
```

</TabItem>
<TabItem label="yarn" icon="seti:yarn">

```sh
yarn dlx wrangler d1 migrations apply <DB_NAME>
```

</TabItem>
<TabItem label="pnpm" icon="pnpm">

```sh
pnpm dlx wrangler d1 migrations apply <DB_NAME>
```

</TabItem>
</Tabs>
<PackageManagers type="exec" pkg="wrangler" args="d1 migrations apply <DB_NAME>" />

:::note
The above command will create the notes table locally. To apply the migration on your remote production database, use the `--remote` flag.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ To use `create-cloudflare` to create a new Angular project with Workers Assets,

<PackageManagers
type="create"
pkg="cloudflare@latest my-angular-app"
args={"--framework=angular --platform=workers"}
pkg="cloudflare@latest"
args="my-angular-app --framework=angular"
/>

After setting up your project, change your directory by running the following command:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import {

<PackageManagers
type="create"
pkg="cloudflare@latest my-astro-app"
args="--framework=astro --platform=workers"
pkg="cloudflare@latest"
args="my-astro-app --framework=astro"
/>

---
Expand All @@ -47,7 +47,7 @@ Astro is also framework-agnostic, and supports every major UI framework, includi
<PackageManagers
type="create"
pkg="cloudflare@latest"
args="my-astro-app -- --framework=astro --platform=workers"
args="my-astro-app --framework=astro"
/>

<Details header="What's happening behind the scenes?">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ To use `create-cloudflare` to create a new Docusaurus project with Workers Asset

<PackageManagers
type="create"
pkg="cloudflare@latest my-docusaurus-app"
args={"--framework=docusaurus --platform=workers"}
pkg="cloudflare@latest"
args="my-docusaurus-app --framework=docusaurus"
/>

After setting up your project, change your directory by running the following command:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ To use `create-cloudflare` to create a new Gatsby project with Workers Assets, r

<PackageManagers
type="create"
pkg="cloudflare@latest my-gatsby-app"
args={"--framework=gatsby --platform=workers"}
pkg="cloudflare@latest"
args="my-gatsby-app --framework=gatsby"
/>

After setting up your project, change your directory by running the following command:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import {

<PackageManagers
type="create"
pkg="cloudflare@latest my-hono-app"
args="--template=cloudflare/templates/vite-react-template"
pkg="cloudflare@latest"
args="my-hono-app --template=cloudflare/templates/vite-react-template"
/>
---

Expand All @@ -41,8 +41,8 @@ With Workers Assets, you can easily combine a Hono API running on Workers with a

<PackageManagers
type="create"
pkg="cloudflare@latest my-hono-app"
args="--template=cloudflare/templates/vite-react-template"
pkg="cloudflare@latest"
args="my-hono-app --template=cloudflare/templates/vite-react-template"
/>
<Details header="How is this project set up?">
Below is a simplified file tree of the project.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ The OpenNext adapter is in currently in beta.

<PackageManagers
type="create"
pkg="cloudflare@latest my-next-app"
args={"--framework=next --platform=workers"}
pkg="cloudflare@latest"
args="my-next-app --framework=next"
/>

This is a simple getting started guide. For detailed documentation on how the to use the Cloudflare OpenNext adapter, visit the [OpenNext website](https://opennext.js.org/cloudflare).
Expand All @@ -46,8 +46,8 @@ You can deploy your Next.js app to Cloudflare Workers using the OpenNext adaptor

<PackageManagers
type="create"
pkg="cloudflare@latest my-next-app"
args={"--framework=next --platform=workers"}
pkg="cloudflare@latest"
args="my-next-app --framework=next"
/>

<Details header="What's happening behind the scenes?">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ To use `create-cloudflare` to create a new Nuxt project with Workers Assets, run

<PackageManagers
type="create"
pkg="cloudflare@latest my-nuxt-app"
args={"--framework=nuxt --platform=workers"}
pkg="cloudflare@latest"
args="my-nuxt-app --framework=nuxt"
/>

After setting up your project, change your directory by running the following command:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ To use `create-cloudflare` to create a new Qwik project with Workers Assets, run

<PackageManagers
type="create"
pkg="cloudflare@latest my-qwik-app"
args={"--framework=qwik --platform=workers"}
pkg="cloudflare@latest"
args="my-qwik-app --framework=qwik"
/>

After setting up your project, change your directory by running the following command:
Expand Down
Loading
Loading