Skip to content

Commit

Permalink
Merge branch 'v2' into genezio-nitro
Browse files Browse the repository at this point in the history
  • Loading branch information
tudorpip authored Aug 5, 2024
2 parents 0b55856 + 6f1fa4b commit 6934cf2
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions docs/2.deploy/20.providers/cloudflare.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,21 @@ If you use the [Cloudflare Pages GitHub/GitLab integration](https://developers.c

If instead you want preview your application locally and/or manually deploy it, when building the application you will need to let Nitro know that the target environment is the Cloudflare Pages one, you can do that in two ways:

1. By defining either the `NITRO_PRESET` or the `SERVER_PRESET` environment variable set to `cloudflare_pages` when running the build process, like so:
- By defining either the `NITRO_PRESET` or the `SERVER_PRESET` environment variable set to `cloudflare_pages` when running the build process, like so:

```bash
NITRO_PRESET=cloudflare_pages npm run build
```
```bash
NITRO_PRESET=cloudflare_pages npm run build
```

1. Or by updating your Nitro [preset configuration](/config#preset):
- Or by updating your Nitro [preset configuration](/config#preset):

```json5
"preset": "cloudflare_pages",
```
```json5
"preset": "cloudflare_pages",
```

and then running the standard build command:
and then running the standard build command:

:pm-run{script="build"}
:pm-run{script="build"}

### Wrangler

Expand Down Expand Up @@ -120,7 +120,7 @@ npm i wrangler
wrangler login
```
Generate your app using the `cloudflare` preset:
Generate your app using the `cloudflare_module` preset:
```bash
NITRO_PRESET=cloudflare_module npm run build
Expand Down Expand Up @@ -309,6 +309,6 @@ export default defineNuxtConfig({
From this moment, when running
::pm-run{script="dev"}
:pm-run{script="dev"}
you will be able to access the `MY_VARIABLE` and `MY_KV` from the request event just as illustrated above.

0 comments on commit 6934cf2

Please sign in to comment.