本页还没有译文
本页 18 段还没译成Español,下面显示的是英文原文。Hono
还没翻译译自英文(developers.cloudflare.com)本页 18 段都还没译
Start from CLI - scaffold a full-stack app with a Hono API, React SPA and the Cloudflare Vite plugin for lightning-fast development.
npm create cloudflare@latest -- my-hono-app --template=cloudflare/templates/vite-react-templateyarn create cloudflare my-hono-app --template=cloudflare/templates/vite-react-templatepnpm create cloudflare@latest my-hono-app --template=cloudflare/templates/vite-react-templateOr just deploy - create a full-stack app using Hono, React and Vite, with CI/CD and previews all set up for you.
What is Hono?
Hono is an ultra-fast, lightweight framework for building web applications, and works fantastically with Cloudflare Workers. With Workers Assets, you can easily combine a Hono API running on Workers with a SPA to create a full-stack app.
Creating a full-stack Hono app with a React SPA
-
Create a new project with the create-cloudflare CLI (C3)
npm create cloudflare@latest -- my-hono-app --template=cloudflare/templates/vite-react-templateyarn create cloudflare my-hono-app --template=cloudflare/templates/vite-react-templatepnpm create cloudflare@latest my-hono-app --template=cloudflare/templates/vite-react-template -
Develop locally with the Cloudflare Vite plugin
After creating your project, run the following command in your project directory to start a local development server.
npm run devyarn run devpnpm run dev -
Deploy your project
Your project can be deployed to a
*.workers.devsubdomain or a Custom Domain, from your own machine or from any CI/CD system, including Cloudflare's own Workers Builds.The following command will build and deploy your project. If you are using CI, ensure you update your "deploy command" configuration appropriately.
npm run deployyarn run deploypnpm run deploy
Bindings
The Hono documentation provides information on how you can access bindings in your Hono app.
With bindings, your application can be fully integrated with the Cloudflare Developer Platform, giving you access to compute, storage, AI and more.