-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bc3bcbd
commit 35db52f
Showing
9 changed files
with
233 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
src/content/docs/workers/frameworks/framework-guides/qwik.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
--- | ||
pcx_content_type: how-to | ||
title: Qwik | ||
sidebar: | ||
badge: Beta | ||
head: [] | ||
description: Create a Qwik application and deploy it to Cloudflare Workers with Workers Assets. | ||
--- | ||
|
||
import { | ||
Badge, | ||
Description, | ||
InlineBadge, | ||
Render, | ||
PackageManagers, | ||
} from "~/components"; | ||
|
||
In this guide, you will create a new [Qwik](https://qwik.dev/) application and deploy to Cloudflare Workers (with the new [<InlineBadge preset="beta" /> Workers Assets](/workers/configuration/assets/)). | ||
|
||
## 1. Set up a new project | ||
|
||
Use the [`create-cloudflare`](https://www.npmjs.com/package/create-cloudflare) CLI (C3) to set up a new project. C3 will create a new project directory, initiate Qwik's official setup tool, and provide the option to deploy instantly. | ||
|
||
To use `create-cloudflare` to create a new Qwik project with <InlineBadge preset="beta" /> Workers Assets, run the following command: | ||
|
||
<PackageManagers | ||
type="create" | ||
pkg="cloudflare@latest my-qwik-app" | ||
args={"--framework=qwik --experimental"} | ||
/> | ||
|
||
<Render | ||
file="c3-post-run-steps" | ||
product="workers" | ||
params={{ | ||
category: "web-framework", | ||
framework: "Qwik", | ||
}} | ||
/> | ||
|
||
After setting up your project, change your directory by running the following command: | ||
|
||
```sh | ||
cd my-qwik-app | ||
``` | ||
|
||
## 2. Develop locally | ||
|
||
After you have created your project, run the following command in the project directory to start a local server. This will allow you to preview your project locally during development. | ||
|
||
<PackageManagers type="run" args={"dev"} /> | ||
|
||
## 3. Deploy your Project | ||
|
||
Your project can be deployed to a `*.workers.dev` subdomain or a [Custom Domain](/workers/configuration/routing/custom-domains/), from your own machine or from any CI/CD system, including Cloudflare's own. | ||
|
||
The following command will build and deploy your project. If you're using CI, ensure you update your ["deploy command"](/workers/ci-cd/builds/build-configuration/#build-settings) configuration appropriately. | ||
|
||
<PackageManagers type="run" args={"deploy"} /> | ||
|
||
--- | ||
|
||
## Bindings | ||
|
||
Your Qwik application can be fully integrated with the Cloudflare Developer Platform, in both local development and in production, by using product bindings. The [Qwik documentation](https://qwik.dev/docs/deployments/cloudflare-pages/#context) provides information about configuring bindings and how you can access them in your Qwik endpoint methods. | ||
|
||
## Static assets | ||
|
||
You can serve static assets your Qwik application by placing them in [the `./public/` directory](https://qwik.dev/docs/advanced/static-assets/). This can be useful for resource files such as images, stylesheets, fonts, and manifests. | ||
|
||
<Render file="workers-assets-routing-summary" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
src/content/docs/workers/frameworks/framework-guides/solid.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
--- | ||
pcx_content_type: how-to | ||
title: Solid | ||
sidebar: | ||
badge: Beta | ||
head: [] | ||
description: Create a Solid application and deploy it to Cloudflare Workers with Workers Assets. | ||
--- | ||
|
||
import { | ||
Badge, | ||
Description, | ||
InlineBadge, | ||
Render, | ||
PackageManagers, | ||
} from "~/components"; | ||
|
||
In this guide, you will create a new [Solid](https://www.solidjs.com/) application and deploy to Cloudflare Workers (with the new [<InlineBadge preset="beta" /> Workers Assets](/workers/configuration/assets/)). | ||
|
||
## 1. Set up a new project | ||
|
||
Use the [`create-cloudflare`](https://www.npmjs.com/package/create-cloudflare) CLI (C3) to set up a new project. C3 will create a new project directory, initiate Solid's official setup tool, and provide the option to deploy instantly. | ||
|
||
To use `create-cloudflare` to create a new Solid project with <InlineBadge preset="beta" /> Workers Assets, run the following command: | ||
|
||
<PackageManagers | ||
type="create" | ||
pkg="cloudflare@latest my-solid-app" | ||
args={"--framework=solid --experimental"} | ||
/> | ||
|
||
<Render | ||
file="c3-post-run-steps" | ||
product="workers" | ||
params={{ | ||
category: "web-framework", | ||
framework: "Solid", | ||
}} | ||
/> | ||
|
||
After setting up your project, change your directory by running the following command: | ||
|
||
```sh | ||
cd my-solid-app | ||
``` | ||
|
||
## 2. Develop locally | ||
|
||
After you have created your project, run the following command in the project directory to start a local server. This will allow you to preview your project locally during development. | ||
|
||
<PackageManagers type="run" args={"dev"} /> | ||
|
||
## 3. Deploy your Project | ||
|
||
Your project can be deployed to a `*.workers.dev` subdomain or a [Custom Domain](/workers/configuration/routing/custom-domains/), from your own machine or from any CI/CD system, including Cloudflare's own. | ||
|
||
The following command will build and deploy your project. If you're using CI, ensure you update your ["deploy command"](/workers/ci-cd/builds/build-configuration/#build-settings) configuration appropriately. | ||
|
||
<PackageManagers type="run" args={"deploy"} /> | ||
|
||
--- | ||
|
||
## Bindings | ||
|
||
Your Solid application can be fully integrated with the Cloudflare Developer Platform, in both local development and in production, by using product bindings. The [Solid documentation](https://docs.solidjs.com/reference/server-utilities/get-request-event) provides information about how to access platform primitives, including bindings. Specifically, for Cloudflare, you can use [`getRequestEnv().nativeEvent.context.cloudflare.env`](https://docs.solidjs.com/solid-start/advanced/request-events#nativeevent) to access bindings. | ||
|
||
## Static assets | ||
|
||
You can serve static assets your Solid application by placing them in [the `./public/` directory](https://docs.solidjs.com/solid-start/building-your-application/static-assets). This can be useful for resource files such as images, stylesheets, fonts, and manifests. | ||
|
||
<Render file="workers-assets-routing-summary" /> |
71 changes: 71 additions & 0 deletions
71
src/content/docs/workers/frameworks/framework-guides/svelte.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
--- | ||
pcx_content_type: how-to | ||
title: Svelte | ||
sidebar: | ||
badge: Beta | ||
head: [] | ||
description: Create a Svelte application and deploy it to Cloudflare Workers with Workers Assets. | ||
--- | ||
|
||
import { | ||
Badge, | ||
Description, | ||
InlineBadge, | ||
Render, | ||
PackageManagers, | ||
} from "~/components"; | ||
|
||
In this guide, you will create a new [Svelte](https://svelte.dev/) application and deploy to Cloudflare Workers (with the new [<InlineBadge preset="beta" /> Workers Assets](/workers/configuration/assets/)). | ||
|
||
## 1. Set up a new project | ||
|
||
Use the [`create-cloudflare`](https://www.npmjs.com/package/create-cloudflare) CLI (C3) to set up a new project. C3 will create a new project directory, initiate Svelte's official setup tool, and provide the option to deploy instantly. | ||
|
||
To use `create-cloudflare` to create a new Svelte project with <InlineBadge preset="beta" /> Workers Assets, run the following command: | ||
|
||
<PackageManagers | ||
type="create" | ||
pkg="cloudflare@latest my-svelte-app" | ||
args={"--framework=svelte --experimental"} | ||
/> | ||
|
||
<Render | ||
file="c3-post-run-steps" | ||
product="workers" | ||
params={{ | ||
category: "web-framework", | ||
framework: "Svelte", | ||
}} | ||
/> | ||
|
||
After setting up your project, change your directory by running the following command: | ||
|
||
```sh | ||
cd my-svelte-app | ||
``` | ||
|
||
## 2. Develop locally | ||
|
||
After you have created your project, run the following command in the project directory to start a local server. This will allow you to preview your project locally during development. | ||
|
||
<PackageManagers type="run" args={"dev"} /> | ||
|
||
## 3. Deploy your Project | ||
|
||
Your project can be deployed to a `*.workers.dev` subdomain or a [Custom Domain](/workers/configuration/routing/custom-domains/), from your own machine or from any CI/CD system, including Cloudflare's own. | ||
|
||
The following command will build and deploy your project. If you're using CI, ensure you update your ["deploy command"](/workers/ci-cd/builds/build-configuration/#build-settings) configuration appropriately. | ||
|
||
<PackageManagers type="run" args={"deploy"} /> | ||
|
||
--- | ||
|
||
## Bindings | ||
|
||
Your Svelte application can be fully integrated with the Cloudflare Developer Platform, in both local development and in production, by using product bindings. The [Svelte documentation](https://kit.svelte.dev/docs/adapter-cloudflare#runtime-apis) provides information about configuring bindings and how you can access them in your Svelte hooks and endpoints. | ||
|
||
## Static assets | ||
|
||
You can serve static assets your Svelte application by placing them in [the `./static/` directory](https://kit.svelte.dev/docs/project-structure#project-files-static). This can be useful for resource files such as images, stylesheets, fonts, and manifests. | ||
|
||
<Render file="workers-assets-routing-summary" /> |