Skip to content

Commit

Permalink
fix links
Browse files Browse the repository at this point in the history
  • Loading branch information
penalosa committed Dec 17, 2024
1 parent 9c11445 commit 5262d96
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,5 +118,5 @@ const res = await mf.dispatchFetch("http://api.mf/todos/update/1", { ... });

Miniflare supports the `script_name` option for accessing Durable Objects
exported by other scripts. See
[📌 Durable Objects](/workers/miniflare/storage/durable-objects#using-a-class-exported-by-another-script)
[📌 Durable Objects](/workers/testing/miniflare/storage/durable-objects#using-a-class-exported-by-another-script)
for more details.
6 changes: 3 additions & 3 deletions src/content/docs/workers/testing/miniflare/get-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ order: 1
title: Get Started
---

The Miniflare API allows you to dispatch events to workers without making actual HTTP requests, simulate connections between Workers, and interact with local emulations of storage products like [KV](/workers/miniflare/storage/kv), [R2](/workers/miniflare/storage/r2), and [Durable Objects](/workers/miniflare/storage/durable-objects). This makes it great for writing tests, or other advanced use cases where you need finer-grained control.
The Miniflare API allows you to dispatch events to workers without making actual HTTP requests, simulate connections between Workers, and interact with local emulations of storage products like [KV](/workers/testing/miniflare/storage/kv), [R2](/workers/testing/miniflare/storage/r2), and [Durable Objects](/workers/testing/miniflare/storage/durable-objects). This makes it great for writing tests, or other advanced use cases where you need finer-grained control.

## Installation

Expand Down Expand Up @@ -47,7 +47,7 @@ console.log(await res.text()); // Hello Miniflare!
await mf.dispose();
```

The [rest of these docs](/workers/miniflare/core/fetch) go into more detail on configuring
The [rest of these docs](/workers/testing/miniflare/core/fetch) go into more detail on configuring
specific features.

### String and File Scripts
Expand Down Expand Up @@ -162,7 +162,7 @@ const queueResult = await worker.queue("needy", [
console.log(queueResult); // { outcome: "ok", retryAll: true, ackAll: false, explicitRetries: [], explicitAcks: []}
```

See [📨 Fetch Events](/workers/miniflare/core/fetch) and [⏰ Scheduled Events](/workers/miniflare/core/scheduled)
See [📨 Fetch Events](/workers/testing/miniflare/core/fetch) and [⏰ Scheduled Events](/workers/testing/miniflare/core/scheduled)
for more details.

### HTTP Server
Expand Down
4 changes: 3 additions & 1 deletion src/content/docs/workers/testing/miniflare/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ TypeScript, and runs your code in a sandbox implementing Workers' runtime APIs.
-**Fully-local:** test and develop Workers without an Internet connection.
Reload code on change quickly.

<LinkButton href="/workers/miniflare/get-started">Get Started</LinkButton>
<LinkButton href="/workers/testing/miniflare/get-started">
Get Started
</LinkButton>
<LinkButton
variant="secondary"
href="https://github.com/cloudflare/workers-sdk/tree/main/packages/miniflare"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ please open an issue on

We have tried to keep Miniflare v3's API close to Miniflare v2 where possible,
but many options and methods have been removed or changed with the switch to the
open-source `workerd` runtime. See the [Getting Started guide for the new API docs](/workers/miniflare/get-started)
open-source `workerd` runtime. See the [Getting Started guide for the new API docs](/workers/testing/miniflare/get-started)

### Updated Options

Expand Down Expand Up @@ -198,7 +198,7 @@ open-source `workerd` runtime. See the [Getting Started guide for the new API do
[`workerd`](https://github.com/cloudflare/workerd) server listening on the
configured `host` and `port`, so these methods are redundant.
- `dispatchScheduled()/startScheduled()`
- The functionality of `dispatchScheduled` can now be done via `getWorker()`. For more information read the [scheduled events documentation](/workers/miniflare/core/scheduled#dispatching-events).
- The functionality of `dispatchScheduled` can now be done via `getWorker()`. For more information read the [scheduled events documentation](/workers/testing/miniflare/core/scheduled#dispatching-events).
- `dispatchQueue()`
- Use the `queue()` method on
[service bindings](/workers/runtime-apis/bindings/service-bindings)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ console.log(await res.text()); // "1"

Miniflare supports the `script_name` option for accessing Durable Objects
exported by other scripts. This requires mounting the other worker as described
in [🔌 Multiple Workers](/workers/miniflare/core/multiple-workers).
in [🔌 Multiple Workers](/workers/testing/miniflare/core/multiple-workers).

0 comments on commit 5262d96

Please sign in to comment.