JSPM

create-worker-app

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q34399F
  • License MIT

Create Cloudflare Workers apps with Hono.js

Package Exports

  • create-worker-app
  • create-worker-app/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (create-worker-app) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

create-worker-app

快速创建 Cloudflare Workers 应用的脚手架工具,基于 Hono.js 框架。

使用方法

# 使用 npx (推荐)
npx create-worker-app my-app

# 或全局安装
npm install -g create-worker-app
create-worker-app my-app

# 或使用 npm init
npm init worker-app my-app

特性

  • 🚀 基于 Hono.js - 超快的 Web 框架
  • 📝 TypeScript 支持
  • 📚 可选的 OpenAPI/Swagger 文档生成
  • 🗄️ 可选的数据库配置
  • 🛠️ 内置路由生成器
  • ⚡ Cloudflare Workers 优化

创建的项目结构

my-app/
├── src/
│   ├── index.ts          # 应用入口
│   ├── types/            # 类型定义
│   ├── routes/           # API 路由
│   ├── schemas/          # Zod schemas
│   └── lib/              # 工具库
├── scripts/
│   └── generate-route.js # 路由生成器
├── wrangler.toml         # Cloudflare 配置
├── tsconfig.json         # TypeScript 配置
├── package.json
└── README.md

开发

# 克隆仓库
git clone https://github.com/leeguooooo/create-worker-app.git
cd create-worker-app

# 安装依赖
npm install

# 本地测试
node index.js test-app

License

MIT