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 🙏

© 2025 – Pkg Stats / Ryan Hefner

kyle-boot

v1.0.0

Published

NodeJs 服务端框架,基于 typescript 5.6 开发,使用最新版装饰器封装,默认基于 Express 4.26

Downloads

5

Readme

kyle-boot

NodeJs 服务端框架,基于 typescript 5.6 开发,使用最新版装饰器封装,默认基于 Express 4.26

开发进度

  • [x] 读取配置信息,合并根据运行环境配置信息
  • [x] 基本路由监听,参数读取封装
  • [x] 模块注入,完成 AppRequest
  • [ ] 配置参数通过命令初始化模板
  • [ ] 数据库连接,Mysql
  • [x] 请求参数校验,使用 Json Schema 方式定义
  • [ ] Session 数据保存
  • [ ] 全局数据共享
  • [ ] 单个请求数据共享
  • [ ] Session 数据共享
  • [ ] 文件上传保存
  • [x] 跨域请求检查
  • [ ] 请求转发
  • [ ] 模拟消息队列处理
  • [ ] 并发请求处理
  • [ ] 新增注解给路由加注释,并生成文档
  • [x] Json 转 Typescript 类型

命令行参数

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

配置参数

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 | 装载 Service 模块 | 装载的类在一个 application 中只会初始化一次,并在服务停止时销毁 | | AppRequest | Request 类模块 | 一个请求初始化一次,在请求结束时销毁 | | AppModel | 模块注入 | 类装饰器,注入模块系统自动初始化模块, 示例:@AppModel([ TestModel1, TestModel2 ]), 在 constructor 接收初始化对象,constructor(private model1: TestModel1, private model2: TestModel2)) {} | | RequestMapping | 定义路由 | 定义路由,示例 :@RequestMapping("/example", "GET") | | Get | 定义 Get 路由 | Get 路由,示例:@Get("/example") | | Post | 定义 POST 路由 | Post 路由,示例:@POST("/example") | | GetParam | 获取请求参数 | 此装饰器必须在定义路由装饰器之后使用, 详细用法参考:使用教程 |

扩展模块

  • Email, 发送邮件模块