Skip to content

Commit 7dd06aa

Browse files
replace create-react-app with create-vite in pages how-to/tutorials
1 parent 080a884 commit 7dd06aa

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/content/docs/pages/how-to/preview-with-cloudflare-tunnel.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,21 @@ cloudflared version 2021.5.9 (built 2021-05-21-1541 UTC)
2323

2424
## Run a local service
2525

26-
The easiest way to get up and running with Cloudflare Tunnel is to have an application running locally, such as a [React](/pages/framework-guides/deploy-a-react-site/) or [Svelte](/pages/framework-guides/deploy-a-svelte-site/) site. When you are developing an application with these frameworks, they will often make use of a `npm run develop` script, or something similar, which mounts the application and runs it on a `localhost` port. For example, the popular `create-react-app` tool runs your in-development React application on port `3000`, making it accessible at the `http://localhost:3000` address.
26+
The easiest way to get up and running with Cloudflare Tunnel is to have an application running locally, such as a [React](/pages/framework-guides/deploy-a-react-site/) or [Svelte](/pages/framework-guides/deploy-a-svelte-site/) site. When you are developing an application with these frameworks, they will often make use of a `npm run develop` script, or something similar, which mounts the application and runs it on a `localhost` port. For example, the popular `vite` tool runs your in-development React application on port `5173`, making it accessible at the `http://localhost:5173` address.
2727

2828
## Start a Cloudflare Tunnel
2929

3030
With a local development server running, a new Cloudflare Tunnel can be instantiated by running `cloudflared tunnel` in a new command line window, passing in the `--url` flag with your `localhost` URL and port. `cloudflared` will output logs to your command line, including a banner with a tunnel URL:
3131

3232
```sh
33-
cloudflared tunnel --url http://localhost:3000
33+
cloudflared tunnel --url http://localhost:5173
3434
```
3535

3636
```sh output
3737
2021-07-15T20:11:29Z INF Cannot determine default configuration path. No file [config.yml config.yaml] in [~/.cloudflared ~/.cloudflare-warp ~/cloudflare-warp /etc/cloudflared /usr/local/etc/cloudflared]
3838
2021-07-15T20:11:29Z INF Version 2021.5.9
3939
2021-07-15T20:11:29Z INF GOOS: linux, GOVersion: devel +11087322f8 Fri Nov 13 03:04:52 2020 +0100, GoArch: amd64
40-
2021-07-15T20:11:29Z INF Settings: map[url:http://localhost:3000]
40+
2021-07-15T20:11:29Z INF Settings: map[url:http://localhost:5173]
4141
2021-07-15T20:11:29Z INF cloudflared will not automatically update when run from the shell. To enable auto-updates, run cloudflared as a service: https://developers.cloudflare.com/argo-tunnel/reference/service/
4242
2021-07-15T20:11:29Z INF Initial protocol h2mux
4343
2021-07-15T20:11:29Z INF Starting metrics server on 127.0.0.1:42527/metrics
@@ -50,7 +50,7 @@ cloudflared tunnel --url http://localhost:3000
5050
2021-07-15T20:11:32Z INF +-------------------------------------------------------------+
5151
```
5252
53-
In this example, the randomly-generated URL `https://seasonal-deck-organisms-sf.trycloudflare.com` has been created and assigned to your tunnel instance. Visiting this URL in a browser will show the application running, with requests being securely forwarded through Cloudflare's global network, through the tunnel running on your machine, to `localhost:3000`:
53+
In this example, the randomly-generated URL `https://seasonal-deck-organisms-sf.trycloudflare.com` has been created and assigned to your tunnel instance. Visiting this URL in a browser will show the application running, with requests being securely forwarded through Cloudflare's global network, through the tunnel running on your machine, to `localhost:5173`:
5454

5555
![Cloudflare Tunnel example rendering a randomly-generated URL](~/assets/images/pages/how-to/tunnel.png)
5656

src/content/docs/pages/tutorials/build-an-api-with-pages-functions/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ To begin, create a new Pages application using the React framework.
3131

3232
### Create a new React project
3333

34-
In your terminal, create a new React project called `blog-frontend` using the `create-react-app` command. Go into the newly created `blog-frontend` directory and start a local development server:
34+
In your terminal, create a new React project called `blog-frontend` using the `create-vite` command. Go into the newly created `blog-frontend` directory and start a local development server:
3535

3636
```sh title="Create a new React application"
37-
npx create-react-app blog-frontend
37+
npx create-vite -t react blog-frontend
3838
cd blog-frontend
3939
npm start
4040
```

0 commit comments

Comments
 (0)