Skip to content

Commit 702ff52

Browse files
authored
docs: remove Cloudflare Pages descriptions (#884)
1 parent 9d6f5d3 commit 702ff52

5 files changed

Lines changed: 11 additions & 17 deletions

File tree

docs/concepts/stacks.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -126,19 +126,16 @@ Sharing API specifications means that you can be aware of server-side changes.
126126

127127
## With React
128128

129-
You can create applications on Cloudflare Pages using React.
129+
You can create applications on Cloudflare Workers using React.
130130

131131
The API server.
132132

133133
```ts
134-
// functions/api/[[route]].ts
134+
// src/index.ts
135135
import { Hono } from 'hono'
136-
import { handle } from 'hono/cloudflare-pages'
137136
import * as z from 'zod'
138137
import { zValidator } from '@hono/zod-validator'
139138

140-
const app = new Hono()
141-
142139
const schema = z.object({
143140
id: z.string(),
144141
title: z.string(),
@@ -148,23 +145,26 @@ type Todo = z.infer<typeof schema>
148145

149146
const todos: Todo[] = []
150147

151-
const route = app
148+
const api = new Hono()
152149
.post('/todo', zValidator('form', schema), (c) => {
153150
const todo = c.req.valid('form')
154151
todos.push(todo)
155152
return c.json({
156153
message: 'created!',
157154
})
158155
})
159-
.get((c) => {
156+
.get('/todo', (c) => {
160157
return c.json({
161158
todos,
162159
})
163160
})
164161

165-
export type AppType = typeof route
162+
export type AppType = typeof api
163+
164+
const app = new Hono()
165+
app.route('/api', api)
166166

167-
export const onRequest = handle(app, '/api')
167+
export default app
168168
```
169169

170170
The client with React and React Query.

docs/getting-started/cloudflare-workers-vite.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
You can build a full-stack application on [Cloudflare Workers](https://workers.cloudflare.com) with [Vite](https://vite.dev) using the [`@cloudflare/vite-plugin`](https://developers.cloudflare.com/workers/vite-plugin/).
44
This setup gives you a fast Vite dev server, server-side rendering with Hono's JSX renderer, and client-side scripts bundled by Vite — all running on Cloudflare Workers.
55

6-
This is the recommended way to start a new full-stack project on Cloudflare. If you were previously using [Cloudflare Pages](/docs/getting-started/cloudflare-pages), this is its successor.
6+
This is the recommended way to start a new full-stack project on Cloudflare.
77

88
## 1. Setup
99

docs/getting-started/cloudflare-workers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ The same is applied to Bearer Authentication Middleware, JWT Authentication, or
293293

294294
Before deploying code to Cloudflare via CI, you need a Cloudflare token. You can manage it from [User API Tokens](https://dash.cloudflare.com/profile/api-tokens).
295295

296-
If it's a newly created token, select the **Edit Cloudflare Workers** template. If you already have another token, make sure the token has the corresponding permissions. (Note: token permissions are not shared between Cloudflare Pages and Cloudflare Workers).
296+
If it's a newly created token, select the **Edit Cloudflare Workers** template. If you already have another token, make sure the token has the corresponding permissions.
297297

298298
then go to your GitHub repository settings dashboard: `Settings->Secrets and variables->Actions->Repository secrets`, and add a new secret with the name `CLOUDFLARE_API_TOKEN`.
299299

docs/helpers/conninfo.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@ import { Hono } from 'hono'
3131
import { getConnInfo } from 'hono/aws-lambda'
3232
```
3333

34-
```ts [Cloudflare Pages]
35-
import { Hono } from 'hono'
36-
import { getConnInfo } from 'hono/cloudflare-pages'
37-
```
38-
3934
```ts [Netlify]
4035
import { Hono } from 'hono'
4136
import { getConnInfo } from 'hono/netlify'

docs/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ See [more information about routes](/docs/concepts/routers).
138138
Thanks to the use of the **Web Standards**, Hono works on a lot of platforms.
139139

140140
- Cloudflare Workers
141-
- Cloudflare Pages
142141
- Fastly Compute
143142
- Deno
144143
- Bun

0 commit comments

Comments
 (0)