You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/workers/framework-guides/web-apps/tanstack-start.mdx
+14-24Lines changed: 14 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
1
---
2
2
pcx_content_type: how-to
3
-
title: TanStack
3
+
title: TanStack Start
4
4
sidebar:
5
5
order: 7
6
6
head: []
7
7
tags: ["full-stack"]
8
-
description: Create a TanStack Start application and deploy it to Cloudflare Workers with Workers Assets.
8
+
description: Create a TanStack Start application and deploy it to Cloudflare Workers.
9
9
---
10
10
11
11
import {
@@ -16,28 +16,26 @@ import {
16
16
PackageManagers,
17
17
} from"~/components";
18
18
19
-
In this guide, you will create a new [TanStack Start](https://tanstack.com/start) application and deploy it to Cloudflare Workers (with the new [Workers Assets](/workers/static-assets/)).
19
+
In this guide, you will create a new [TanStack Start](https://tanstack.com/start) application and deploy it to Cloudflare Workers.
20
20
21
21
## 1. Set up a new project
22
22
23
-
Start by cloning the Cloudflare example from the official TanStack repository.
23
+
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 TanStack Start's official setup tool, and provide the option to deploy instantly.
24
+
25
+
To use `create-cloudflare` to create a new TanStack Start project with Workers Assets, run the following command:
After setting up your project, change your directory by running the following command:
32
34
33
35
```sh
34
-
cd my-tanstack-app
36
+
cd my-tanstack-start-app
35
37
```
36
38
37
-
And install the project's dependencies with:
38
-
39
-
<PackageManagerstype="install" />
40
-
41
39
## 2. Develop locally
42
40
43
41
After you have created your project, run the following command in the project directory to start a local development server. This will allow you to preview your project locally during development.
@@ -46,21 +44,15 @@ After you have created your project, run the following command in the project di
46
44
47
45
## 3. Deploy your Project
48
46
49
-
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](/workers/ci-cd/builds/).
50
-
51
-
To deploy your application you will first need to build it:
47
+
You can deploy your project 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 [Workers Builds](/workers/ci-cd/builds/).
52
48
53
-
<PackageManagerstype="run"args="build" />
49
+
The following command will build and deploy your project. If you are using CI, ensure you update your [**Deploy command**](/workers/ci-cd/builds/configuration/#build-settings) configuration appropriately.
54
50
55
-
Once it's been built you can deploy it via:
56
-
57
-
<PackageManagerstype="run"args="deploy" />
58
-
59
-
If you're using CI, ensure you update your ["deploy command"](/workers/ci-cd/builds/configuration/#build-settings) configuration appropriately.
51
+
<PackageManagerstype="run"args={"deploy"} />
60
52
61
53
:::note
62
54
63
-
After having built the application you can run the `preview` script to preview the built output locally before deploying it.
55
+
Before deploying your application, you can also run the `preview` script to preview the built output locally before deploying it.
64
56
This can help you making sure that your application will work as intended once it's been deployed to the Cloudflare network:
0 commit comments