-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Workers for Platforms: Static assets docs #19527
Workers for Platforms: Static assets docs #19527
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.
1 files reviewed, 4 total issue(s) found.
src/content/docs/cloudflare-for-platforms/workers-for-platforms/configuration/static-assets.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/cloudflare-for-platforms/workers-for-platforms/configuration/static-assets.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/cloudflare-for-platforms/workers-for-platforms/configuration/static-assets.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/cloudflare-for-platforms/workers-for-platforms/configuration/static-assets.mdx
Outdated
Show resolved
Hide resolved
86664cc
to
c68c757
Compare
…s/configuration/static-assets.mdx Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com>
…s/configuration/static-assets.mdx Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com>
…s/configuration/static-assets.mdx Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com>
…s/configuration/static-assets.mdx Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com>
--- | ||
Workers for Platforms lets you deploy front-end applications at scale. By hosting static assets on Cloudflare's global network, you can deliver faster load times worldwide and eliminate the need for external infrastructure. You can also combine these static assets with dynamic logic in Cloudflare Workers, providing a full-stack experience for your customers. |
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.
think helpful to link to workers docs around static assets to connect dots that this is fundamentally same thing
Your applications scale automatically to handle high traffic without requiring you to provision or manage infrastructure. Cloudflare dynamically adjusts to demand in real time. | ||
|
||
#### Unified deployment for static and dynamic content | ||
Deploy front-end assets alongside server-side logic, all within Cloudflare Workers. This eliminates the need for a separate hosting provider and ensures a streamlined deployment process. |
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.
^ this stuff + above — find way to make it topline here
or in platform section of WFP docs
think in config section - get straight to the chase and show vs tell
} | ||
``` | ||
|
||
To start the upload process, send a POST request to the Create Assets Upload Session [API endpoint](/api/resources/workers_for_platforms/subresources/dispatch/subresources/namespaces/subresources/scripts/subresources/asset_upload/methods/create/) |
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.
This is using REST API directly not the SDK because SDK doesn't support it? Or another reason?
**Sample request:** | ||
|
||
```bash | ||
curl -X POST \ |
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.
same question here — SDK?
|
||
# Deploying static assets with Wrangler | ||
|
||
If you prefer a CLI-based approach and your platform setup allows direct publishing, you can use Wrangler to deploy both your Worker code and static assets. Wrangler bundles and uploads static assets (from a specified directory) along with your Worker script, so you can manage everything in one place. |
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.
I think framing this more as "you can do this to test things out"
I don't get the case where there is any WFP platform that gives the customer keys to just publish with wrangler? Something I am missing?
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.
I think could just say — in this flow, works just like Workers Assets (link) — you just include these flags:
npx wrangler deploy --name <USER_WORKER_NAME> --dispatch-namespace <NAMESPACE_NAME>
Otherwise — end up repeating same thing that is in Workers Assets docs
Congratulations @dinasaur404, the maintainer of this repository has issued you a holobyte! Here it is: https://holopin.io/holobyte/cm6jpyixl67870cl2j3f9djph This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account. |
Summary
Adding documentation around how Workers for Platforms customers can use Static Assets. This includes instructions for uploading static assets using the API & Wrangler.
Documentation checklist