-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add miniflare docs #18690
base: production
Are you sure you want to change the base?
Add miniflare docs #18690
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
22 files reviewed, 30 total issue(s) found.
Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
21 files reviewed, 10 total issue(s) found.
|
||
## HTTP Requests | ||
|
||
Whenever an HTTP request is made, a `Request` object is dispatched to your worker, then the generated `Response` is returned. The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issues:
- Style Guide - (Terms-error) Use 'Worker' instead of 'worker'.
Fix Explanation:
The term 'worker' is a code reference, so no change is needed.
## Manipulating Outside Workers | ||
|
||
For testing, it can be useful to make requests to your Durable Objects from | ||
outside a worker. You can do this with the `getDurableObjectNamespace` method. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issues:
- Style Guide - (Terms-error) Use 'Worker' instead of 'worker'.
Fix Explanation:
The term 'worker' is a code reference, as indicated by the surrounding tick marks. Therefore, no correction is needed according to the guidelines.
## Using a Class Exported by Another Script | ||
|
||
Miniflare supports the `script_name` option for accessing Durable Objects | ||
exported by other scripts. This requires mounting the other worker as described |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported by other scripts. This requires mounting the other worker as described | |
exported by other scripts. This requires mounting the other Worker as described |
Issues:
- Style Guide - (Terms-error) Use 'Worker' instead of 'worker'.
Fix Explanation:
The capitalization of 'worker' to 'Worker' is recommended by the style guide. This is a straightforward capitalization correction.
## Manipulating Outside Workers | ||
|
||
For testing, it can be useful to put/get data from R2 storage | ||
outside a worker. You can do this with the `getR2Bucket` method: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
outside a worker. You can do this with the `getR2Bucket` method: | |
outside a Worker. You can do this with the `getR2Bucket` method: |
Issues:
- Style Guide - (Terms-error) Use 'Worker' instead of 'worker'.
Fix Explanation:
The term 'worker' should be capitalized to 'Worker' as per the style guide recommendation. It is not a code reference, so the capitalization correction is applicable here.
title: "🔌 Multiple Workers" | ||
--- | ||
|
||
Miniflare allows you to run multiple workers in the same instance. All Workers can be defined at the same level, using the `workers` option. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issues:
- Style Guide - (Terms-error) Use 'Workers' instead of 'workers'.
Fix Explanation:
The term 'workers' is a code reference, so we should not change its capitalization. The style guide's recommendation is a false positive in this context.
}); | ||
``` | ||
|
||
You can now access KV namespaces in your workers: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can now access KV namespaces in your workers: | |
You can now access KV namespaces in your Workers: |
Issues:
- Style Guide - (Terms-error) Use 'Workers' instead of 'workers'.
Fix Explanation:
The capitalization of 'workers' should be corrected to 'Workers' as per the style guide recommendation. This is not a code reference, so the correction is valid.
|
||
## Manipulating Outside Workers | ||
|
||
For testing, it can be useful to put/get data from KV outside a worker. You can |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For testing, it can be useful to put/get data from KV outside a worker. You can | |
For testing, it can be useful to put/get data from KV outside a Worker. You can |
Issues:
- Style Guide - (Terms-error) Use 'Worker' instead of 'worker'.
Fix Explanation:
The capitalization of 'worker' should be corrected to 'Worker' as per the style guide recommendation. This is not a code reference, so the correction is valid.
Deploying cloudflare-docs with Cloudflare Pages
|
Adds the contents of https://miniflare.dev/, with non-relevant sections removed/modified. There are two commits—one with a full import of the content, and one with sections removed.
I imagine this will be a process of keeping these up to date and making them more detailed, but this should be a good start to allow us to retire https://miniflare.dev/ and the Miniflare 2 repo.