Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/honojs/examples
Examples using Hono.
https://github.com/honojs/examples
bun cloudflare cloudflare-workers deno
Last synced: 6 days ago
JSON representation
Examples using Hono.
- Host: GitHub
- URL: https://github.com/honojs/examples
- Owner: honojs
- Created: 2022-04-27T05:58:37.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-26T14:05:21.000Z (16 days ago)
- Last Synced: 2024-11-29T13:06:20.962Z (13 days ago)
- Topics: bun, cloudflare, cloudflare-workers, deno
- Language: TypeScript
- Homepage: https://hono.dev
- Size: 977 KB
- Stars: 662
- Watchers: 5
- Forks: 55
- Open Issues: 24
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome - honojs/examples - Examples using Hono. (TypeScript)
README
# Hono Examples
This repository contains examples that use [Hono](https://hono.dev).
## Included Examples
- [basic](./basic/) - basic usage of routing, middleware, and `Context`
- [blog](./blog/) - CRUD example
- [durable-objects](./durable-objects/) - simple example with Cloudflare Durable Objects
- [env-vars](./env-vars/) - example using environment variables with Hono in Typescript: `Bindings` & `Variables`
- [jsx-ssr](./jsx-ssr/) - JSX Server Side Rendering with `JSX` Middleware
- [hono-vite-jsx](./hono-vite-jsx/) - Example of using `hono/jsx/dom` with `vite`
- [serve-static](./serve-static/) - example of `Serve Static` Middleware
- [deno](./deno/) - Deno example
- [bun](./bun/) - Bun example
- [pages-stack](./pages-stack/) - Zod + Zod Validator + `hc` + React on Cloudflare Pages## Running Examples
Install dependencies
```bash
npm install
```For running the examples, run the below command and replace `[workspace]` with the example name.
```bash
npm -w [workspace] run dev
```Or if you have cloned a specific example, you can follow the instructions in the example's README.
### For deno examples
```bash
deno run --allow-net hello.ts
```or allow to read files on local disk:
```bash
deno run --allow-net --allow-read jsx.tsx
```### For bun examples
Install dependencies
```bash
bun install
```Run the example
```bash
bun run hello.ts
```## Author
Yusuke Wada https://github.com/yusukebe
## License
Distributed under the MIT License.