npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

kyleleung-boot-kit

v1.0.5

Published

🚀 一个基于 TypeScript 5.6 的 Node.js 服务端开发框架,采用 **最新装饰器语法** 封装,默认使用 **Express 4.26**,支持模块注入、配置管理、请求处理等特性,适用于快速构建中大型后端服务。

Readme

kyleleung-boot-kit

🚀 一个基于 TypeScript 5.6 的 Node.js 服务端开发框架,采用 最新装饰器语法 封装,默认使用 Express 4.26,支持模块注入、配置管理、请求处理等特性,适用于快速构建中大型后端服务。


✨ 特性亮点

  • 支持多环境配置合并
  • 完整的模块装饰器体系
  • 请求参数自动映射与校验(基于 JSON Schema)
  • 支持跨域检查、中间件扩展
  • 可选 Session 持久化、请求数据共享
  • 命令行启动参数灵活
  • TypeScript 类型自动生成支持

📦 安装使用

npm install kyleleung-boot-kit

开发启动:

npm run dev

生产构建:

npm run build

🧱 开发进度

  • ✅ 配置读取与多环境合并
  • ✅ 路由与参数封装
  • ✅ 模块注入机制(AppRequest)
  • ⬜ 配置命令初始化模板
  • ⬜ 数据库连接(MySQL)
  • ✅ 请求参数校验(JSON Schema)
  • ⬜ Session 持久化
  • ⬜ 全局数据共享
  • ⬜ 请求作用域数据共享
  • ⬜ 文件上传支持
  • ✅ 跨域请求处理
  • ⬜ 请求转发代理
  • ⬜ 模拟消息队列支持
  • ⬜ 并发任务处理
  • ⬜ 注解生成接口文档
  • ✅ JSON 转 TypeScript 类型定义工具

🧾 命令行参数

| 参数 | 说明 | | ------------ | ------------ | | APP_ENV | 运行环境名称 | | configPath | 配置文件路径 |


⚙️ 配置文件格式(YAML)

Server:
  port: 8001
  host: 0.0.0.0
  publicKey: 5e7692707c144a33
  staticPath: "./stub"
  staticRoute: "/public"
  uploadPath: "./stub/res"
  tempPath: "./stub/temp"
  otherPath: "/Users/mnt/api"

Log:
  level: info
  savePath: "./logs"

Session:
  enabled: true
  timeout: 120000

Email:
  pop3: pop3.163.com
  smtp: smtp.163.com
  user: [email protected]
  accessKey: 123456

🧩 装饰器一览

| 装饰器 | 说明 | 示例 / 说明 | | ------------------ | -------------------- | ------------------------------------ | | @BootApplication | 启动类入口 | 自动装载配置与模块 | | @Config | 装载配置数据 | 启动类中使用 | | @GetConfig | 获取配置信息 | @GetConfig("Server", "host") | | @AppService | 注册服务模块(单例) | 应用级模块 | | @AppRequest | 请求作用域模块 | 请求级别实例 | | @AppModel | 注入模块依赖 | @AppModel([A, B]) 构造函数自动注入 | | @RequestMapping | 显式定义路由 | @RequestMapping("/user", "GET") | | @Get | 定义 GET 路由 | @Get("/user") | | @Post | 定义 POST 路由 | @Post("/login") | | @GetParam | 获取请求参数 | 定义在控制器方法中,依赖于路由装饰器 |

🔗 更多示例详见 使用教程文档


📦 内置模块

  • Email:发送邮件模块(支持 SMTP)
  • 计划支持更多模块:Session、Redis 缓存、MQ 模拟等

👤 作者

Kyle H Z Liang


📄 License

ISC License