Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
109 changes: 109 additions & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion public/_redirects
Original file line number Diff line number Diff line change
Expand Up @@ -1354,6 +1354,7 @@
/workers/platform/routes/ /workers/configuration/routing/ 301
/workers/about/tips/debugging/ /workers/observability/ 301
/workers/testing/debugging-tools/ /workers/observability/dev-tools/ 301
/workers/testing/local-development/ /workers/local-development/ 301
/workers/about/tips/signing-requests/ /workers/examples/signing-requests/ 301
/workers/about/using-cache/ /workers/reference/how-the-cache-works/ 301
/workers/learning/how-the-cache-works/ /workers/reference/how-the-cache-works/ 301
Expand Down Expand Up @@ -1544,7 +1545,7 @@
/workers/runtime-apis/mtls/ /workers/runtime-apis/bindings/mtls/ 301
/workers/runtime-apis/queues/ /workers/runtime-apis/bindings/bindings/queues/ 301
/workers/runtime-apis/service-bindings/ /workers/runtime-apis/bindings/service-bindings/ 301
/workers/observability/local-development-and-testing/ /workers/testing/local-development/ 301
/workers/observability/local-development-and-testing/ /workers/local-development/ 301
/workers/observability/sentry-integration/ /workers/observability/integrations/sentry 301
/workers/configuration/deployments/ /workers/configuration/versions-and-deployments/ 301
/workers/configuration/continuous-integration/ /workers/ci-cd/ 301
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/d1/observability/debug-d1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,4 @@ You should include as much of the following in any bug report:

* Learn [how to debug Workers](/workers/observability/).
* Understand how to [access logs](/workers/observability/logs/) generated from your Worker and D1.
* Use [`wrangler dev`](/workers/wrangler/commands/#dev) to run your Worker and D1 locally and [debug issues before deploying](/workers/testing/local-development/).
* Use [`wrangler dev`](/workers/wrangler/commands/#dev) to run your Worker and D1 locally and [debug issues before deploying](/workers/local-development/).
4 changes: 2 additions & 2 deletions src/content/docs/pages/functions/bindings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ You can interact with your R2 bucket bindings locally in one of two ways:

:::note

By default, Wrangler automatically persists data to local storage. For more information, refer to [Local development](/workers/testing/local-development/).
By default, Wrangler automatically persists data to local storage. For more information, refer to [Local development](/workers/local-development/).

:::

Expand Down Expand Up @@ -277,7 +277,7 @@ Interact with this binding by using `context.env` (for example, `context.env.NOR

:::note

By default, Wrangler automatically persists data to local storage. For more information, refer to [Local development](/workers/testing/local-development/).
By default, Wrangler automatically persists data to local storage. For more information, refer to [Local development](/workers/local-development/).

:::

Expand Down
6 changes: 3 additions & 3 deletions src/content/docs/pages/functions/wrangler-configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ A [binding](/pages/functions/bindings/) enables your Pages Functions to interact

:::note

When using Wrangler in the default local development mode, files will be written to local storage instead of the preview or production database. Refer to [Local development](/workers/testing/local-development/) for more details.
When using Wrangler in the default local development mode, files will be written to local storage instead of the preview or production database. Refer to [Local development](/workers/local-development/) for more details.

:::

Expand Down Expand Up @@ -471,7 +471,7 @@ When using Wrangler in the default local development mode, files will be written

:::note

When using Wrangler in the default local development mode, files will be written to local storage instead of the preview or production namespace. Refer to [Local development](/workers/testing/local-development/) for more details.
When using Wrangler in the default local development mode, files will be written to local storage instead of the preview or production namespace. Refer to [Local development](/workers/local-development/) for more details.

:::

Expand All @@ -497,7 +497,7 @@ You cannot currently configure a [queues consumer](/queues/reference/how-queues-

:::note

When using Wrangler in the default local development mode, files will be written to local storage instead of the preview or production bucket. Refer to [Local development](/workers/testing/local-development/) for more details.
When using Wrangler in the default local development mode, files will be written to local storage instead of the preview or production bucket. Refer to [Local development](/workers/local-development/) for more details.

:::

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/workers/ci-cd/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pcx_content_type: concept
title: CI/CD
description: Set up continuous integration and continuous deployment for your Workers.
sidebar:
order: 8
order: 9
---

You can set up continuous integration and continuous deployment (CI/CD) for your Workers by using either the integrated build system, [Workers Builds](#workers-builds), or using [external providers](#external-cicd) to optimize your development workflow.
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/workers/configuration/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pcx_content_type: navigation
title: Configuration
sidebar:
order: 7
order: 8
group:
hideIndex: true
---
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/workers/databases/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pcx_content_type: navigation
title: Databases
sidebar:
order: 12
order: 13
group:
hideIndex: true
---
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/workers/demos.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pcx_content_type: navigation
title: Demos and architectures
sidebar:
order: 5
order: 6

---

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/workers/examples/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ hideChildren: true
pcx_content_type: navigation
title: Examples
sidebar:
order: 3
order: 4
---

import { GlossaryTooltip, ListExamples } from "~/components";
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/workers/frameworks/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pcx_content_type: navigation
title: Frameworks
sidebar:
order: 11
order: 12
group:
badge: Beta
head: []
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/workers/glossary.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Glossary
pcx_content_type: glossary
sidebar:
order: 19
order: 20
---

import { Glossary } from "~/components";
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/workers/languages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pcx_content_type: navigation
title: Languages
sidebar:
order: 16
order: 17
head: []
description: Languages supported on Workers, a polyglot platform.
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
title: Local development
pcx_content_type: concept
sidebar:
order: 2
order: 5
head: []
description: Develop your Workers locally via Wrangler.
---

Cloudflare Workers and most connected resources can be fully developed and tested locally - providing confidence that the applications you build locally will work the same way in production. This allows you to be more efficient and effective by providing a faster feedback loop and removing the need to test against remote resources. Local development runs against the same production runtime used by Cloudflare Workers, [workerd](https://github.com/cloudflare/workerd).
Cloudflare Workers and most connected resources can be fully developed and tested locally - providing confidence that the applications you build locally will work the same way in production. This allows you to be more efficient and effective by providing a faster feedback loop and removing the need to [test against remote resources](#develop-using-remote-resources-and-bindings). Local development runs against the same production runtime used by Cloudflare Workers, [workerd](https://github.com/cloudflare/workerd).

In addition to testing Workers locally with [`wrangler dev`](/workers/wrangler/commands/#dev), the use of Miniflare allows you to test other Developer Platform products locally, such as [R2](/r2/), [KV](/kv/), [D1](/d1/), and [Durable Objects](/durable-objects/).

Expand Down Expand Up @@ -50,7 +50,7 @@ npx wrangler dev
| Vectorize | ✅[^2] | ✅ |
| Workflows | ✅ | ❌ |

With any bindings that are not supported locally, you will need to use the `--remote` command in wrangler, such as `wrangler dev --remote`.
With any bindings that are not supported locally, you will need to use the [`--remote` command](#develop-using-remote-resources-and-bindings) in wrangler, such as `wrangler dev --remote`.

[^1]: Using Workers AI always accesses your Cloudflare account in order to run AI models and will incur usage charges even in local development.

Expand All @@ -62,7 +62,7 @@ When running `wrangler dev`, resources such as KV, Durable Objects, D1, and R2 w

### Use bindings in Wrangler configuration files

[Wrangler](/workers/wrangler/) will automatically create local versions of bindings found in the [`wrangler.toml / wrangler.json` file](/workers/wrangler/configuration/). These local resources will not have data in them initially, so you will need to add data manually via Wrangler commands and the [`--local` flag](/workers/testing/local-development/#use---local-flag).
[Wrangler](/workers/wrangler/) will automatically create local versions of bindings found in the [`wrangler.toml / wrangler.json` file](/workers/wrangler/configuration/). These local resources will not have data in them initially, so you will need to add data manually via Wrangler commands and the [`--local` flag](/workers/local-development/#use---local-flag).

When you run `wrangler dev` Wrangler stores local resources in a `.wrangler/state` folder, which is automatically created.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ The `.vscode/launch.json` file only applies to a single workspace. If you prefer

## Related resources

- [Local Development](/workers/testing/local-development/) - Develop your Workers and connected resources locally via Wrangler and [`workerd`](https://github.com/cloudflare/workerd), for a fast, accurate feedback loop.
- [Local Development](/workers/local-development/) - Develop your Workers and connected resources locally via Wrangler and [`workerd`](https://github.com/cloudflare/workerd), for a fast, accurate feedback loop.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ for security purposes. However, measuring CPU execution times is possible in loc
When using DevTools to monitor CPU usage, it may be difficult to replicate specific behavior you are
seeing in production. To mimic production behavior, make sure the requests you send to the local Worker
are similar to requests in production. This might mean sending a large volume of requests, making requests
to specific routes, or using production-like data with the [--remote flag](/workers/testing/local-development/#develop-using-remote-resources-and-bindings).
to specific routes, or using production-like data with the [--remote flag](/workers/local-development/#develop-using-remote-resources-and-bindings).

## Taking a profile

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ DevTools can be used in a variety of situations. For more information, see the d

## Related resources

- [Local development](/workers/testing/local-development/) - Develop your Workers and connected resources locally via Wrangler and workerd, for a fast, accurate feedback loop.
- [Local development](/workers/local-development/) - Develop your Workers and connected resources locally via Wrangler and workerd, for a fast, accurate feedback loop.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ objects in memory.
When using DevTools to profile memory, it may be difficult to replicate specific behavior you are
seeing in production. To mimic production behavior, make sure the requests you send to the local Worker
are similar to requests in production. This might mean sending a large volume of requests, making requests
to specific routes, or using production-like data with the [--remote flag](/workers/testing/local-development/#develop-using-remote-resources-and-bindings).
to specific routes, or using production-like data with the [--remote flag](/workers/local-development/#develop-using-remote-resources-and-bindings).

## Taking a snapshot

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/workers/observability/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pcx_content_type: navigation
title: Observability
sidebar:
order: 14
order: 15
group:
hideIndex: true
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ To view real-time logs associated with any deployed Worker using the Cloudflare
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account.
2. In Account Home, go to **Workers & Pages**.
3. In **Overview**, select your **Worker**.
4. Select **Logs**.
4. Select **Logs**.
5. In the right-hand navigation bar, select **Live**.
</Steps>

Expand Down Expand Up @@ -97,7 +97,7 @@ Logs can be persisted, filtered, and analyzed with [Workers Logs](/workers/obser
## Related resources

- [Errors and exceptions](/workers/observability/errors/) - Review common Workers errors.
- [Local development and testing](/workers/testing/local-development/) - Develop and test you Workers locally.
- [Local development and testing](/workers/local-development/) - Develop and test you Workers locally.
- [Workers Logs](/workers/observability/logs/workers-logs) - Collect, store, filter and analyze logging data emitted from Cloudflare Workers.
- [Logpush](/workers/observability/logs/logpush/) - Learn how to push Workers Trace Event Logs to supported destinations.
- [Tail Workers](/workers/observability/logs/tail-workers/) - Learn how to attach Tail Workers to transform your logs and send them to HTTP endpoints.
Expand Down
Loading
Loading