dalanmiller / hono-examples

Examples using Hono.

Home Page:https://hono.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hono Examples

This repository contains examples that use Hono.

Included Examples

  • basic - basic usage of routing, middleware, and Context
  • blog - CRUD example
  • durable-objects - simple example with Cloudflare Durable Objects
  • env-vars - example using environment variables with Hono in Typescript: Bindings & Variables
  • jsx-ssr - JSX Server Side Rendering with JSX Middleware
  • serve-static - example of Serve Static Middleware
  • deno - Deno example
  • bun - Bun example
  • pages-stack - Zod + Zod Validator + hc + React on Cloudflare Pages

How to run

Cloudflare Workers

Install:

yarn install

Run:

yarn dev

Deno

deno run --allow-net hello.ts

or allow to read files on local disk:

deno run --allow-net --allow-read jsx.tsx

Bun

Install:

bun install

Run:

bun run hello.ts

Author

Yusuke Wada https://github.com/yusukebe

License

Distributed under the MIT License.

About

Examples using Hono.

https://hono.dev


Languages

Language:TypeScript 98.1%Language:HTML 1.4%Language:JavaScript 0.6%