Skip to content

Commit cc6c41b

Browse files
authored
Update hosting.md
1 parent 6b32efc commit cc6c41b

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

docs/start/framework/react/hosting.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,28 @@ pnpm add wrangler -D
8686
}
8787
```
8888

89+
5. Modify package.json script
90+
91+
```json
92+
93+
{
94+
"scripts": {
95+
"dev": "vite dev",
96+
"build": "vite build && tsc --noEmit",
97+
"start": "node .output/server/index.mjs",
98+
// ============ 👇 add this line ============
99+
"deploy": "wrangler deploy"
100+
},
101+
}
102+
103+
```
104+
105+
6. Build and deploy
106+
107+
```bash
108+
pnpm run build && pnpm run deploy
109+
```
110+
89111
Deploy your application to Cloudflare Workers using their one-click deployment process, and you're ready to go!
90112

91113
### Netlify ⭐ _Official Partner_

0 commit comments

Comments
 (0)