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

@fastcar/template-microservices

v1.0.0

Published

基于 fastcar-core 的微服务应用模板

Readme

@fastcar/template-microservices

基于 fastcar-core 的微服务应用模板

简介

这是一个用于快速搭建微服务架构的模板,包含多个服务模块,适用于构建分布式系统。

特性

  • 🚀 基于 fastcar-core 框架
  • 🏗️ 多服务模式(center、connector、chat、web)
  • 🔗 内置 RPC 通信
  • 📦 支持 TypeScript
  • 🔄 支持 PM2 进程管理
  • 🔌 支持 WebSocket

服务模块

  • center: 服务中心,提供服务注册与发现
  • connector: 连接器服务,处理客户端连接
  • chat: 聊天服务,处理实时消息
  • web: Web 服务,提供 HTTP 接口
  • base: 基础服务,提供公共功能

使用方式

安装依赖

cd template
npm install
# 或者
yarn install

开发调试

# 启动单个节点模式
npm run start-node

# 启动 PM2 管理模式
npm run start-pm2

编译项目

npm run build
# 或者
yarn build

启动服务

npm start
# 或者
yarn start

停止服务

npm stop
# 或者
yarn stop

配置说明

配置文件位于 resource/ 目录:

  • application.yml - 主配置
  • application-dev.yml - 开发环境配置
  • ecosystem.config.yml - PM2 配置

项目结构

template/
├── src/
│   ├── annotation/       # 注解定义
│   ├── common/           # 公共代码
│   ├── middleware/       # 中间件
│   ├── servers/          # 服务目录
│   │   ├── base/         # 基础服务
│   │   ├── center/       # 服务中心
│   │   ├── chat/         # 聊天服务
│   │   ├── connector/    # 连接器服务
│   │   └── web/          # Web 服务
│   ├── types/            # 类型定义
│   ├── utils/            # 工具函数
│   ├── app-node.ts       # 单节点入口
│   └── app-pm2.ts        # PM2 入口
├── resource/
│   ├── application.yml
│   ├── application-dev.yml
│   └── ecosystem.config.yml
├── test/                 # 测试文件
├── package.json
├── tsconfig.json
└── ecosystem.config.yml

依赖

相关模板

License

MIT