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

generator-ts-koa-app

v1.0.4

Published

A Yeoman generator that scaffolds a Node.js server project using Koa and TypeScript.

Readme

generator-ts-koa-app

一个基于 Yeoman 的脚手架,用于快速生成以 Koa + TypeScript 为技术栈的 Node.js 服务器工程。

功能特性

  • 🚀 Koa 2 作为 Web 框架
  • 🧩 TypeScript 全量支持,内置 tsconfig.json
  • 🔁 nodemon + ts-node 热更新开发
  • 📦 开箱即用的目录结构:controllers / routes / middlewares / config
  • 📝 示例路由、示例中间件(日志、错误处理)
  • 🧪 可选是否集成 ESLint、Dotenv、Jest

安装

先全局安装 yo

npm install -g yo

然后全局安装本脚手架(推荐方式):

npm install -g generator-ts-koa-app

如果需要指定版本:npm install -g [email protected]
升级到最新版:npm update -g generator-ts-koa-app
卸载:npm uninstall -g generator-ts-koa-app

或:本地源码开发调试

如果你是本地开发者想调试本脚手架源码,可以用 npm link 方式:

cd generator-ts-koa-app
npm install
npm link

使用

在任意空目录下执行:

yo ts-koa-app

按照交互提示输入项目信息即可。

生成完成后:

cd <your-project>
npm install
npm run dev

服务默认监听 http://localhost:3000

生成的工程结构

<project-name>/
├── src/
│   ├── app.ts              # Koa 入口
│   ├── server.ts           # 启动文件
│   ├── config/
│   │   └── index.ts
│   ├── controllers/
│   │   └── hello.controller.ts
│   ├── middlewares/
│   │   ├── error.middleware.ts
│   │   └── logger.middleware.ts
│   └── routes/
│       └── index.ts
├── tsconfig.json
├── nodemon.json
├── package.json
├── .gitignore
└── README.md

License

MIT