jax-hono
v2.0.1
Published
Lightweight framework layer on top of Hono, built for Bun
Readme
Jax-hono
Jax 是本项目的轻量框架层。完整说明见 docs/jax.md。
版本变更和升级说明见 CHANGELOG.md。
给 Codex、Claude 等代码代理看的维护说明见 docs/agent.md。
维护 Jax 内部代码时按目录职责放置文件:
core/ Hono runtime、生命周期、Controller/Service
middleware/ 框架中间件
plugins/ 插件定义、内置插件配置、内置插件实现
build/ 代码生成/扫描注册
helpers/ 框架辅助函数
utils/ 纯工具函数
errors/ 统一错误类型
types/ 框架公共类型.jax-hono 目录只存在于调用项目中,不放在 jax-hono 包内,也不会从包内链接到某个项目。
需要 bun --compile 的项目可以用 setup 包裹 Bun 构建命令:
bun node_modules/jax-hono/setup.ts src/index.ts -- bun build src/index.ts --compile --production --target=bun-windows-x64 --outfile dist/app.exesetup 会在执行命令期间临时把入口里对 jax-hono 的导入切到项目生成入口,命令结束后恢复源码。业务入口仍然写:
import { createApp } from 'jax-hono';
import { config } from './config';
const app = createApp({ config });