百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
N

nestjs-trpc

> 后端框架
开源

为装饰器提供原生支持,并实现一种与 NestJS 约定一致的观点驱动方法。

339 stars0 点赞3 次浏览
访问官网GitHub

工具介绍

为装饰器提供原生支持,并实现一种与 NestJS 约定一致的观点驱动方法。

Introduction

NestJS tRPC is a library designed to integrate the capabilities of tRPC into the NestJS framework. It aims to provide native support for decorators and implement an opinionated approach that aligns with NestJS conventions.

Features

  • Fast Rust-based CLI for type generation with rich error messages
  • Full static typesafety & autocompletion on the client, for inputs, outputs, and errors
  • Implements the NestJS opinionated approach to how tRPC works
  • Watch mode for auto-regeneration during development
  • Out of the box support for Dependency Injection within the routes and procedures
  • Native support for express, fastify, and zod with more drivers to come
  • Examples are available in the ./examples folder

Quickstart

Installation

To install NestJS tRPC with your preferred package manager, you can use any of the following commands:

bash
# bun
bun add nestjs-trpc zod @trpc/server

# npm
npm install nestjs-trpc zod @trpc/server

# pnpm
pnpm add nestjs-trpc zod @trpc/server

# yarn
yarn add nestjs-trpc zod @trpc/server

Generate Types

Run the CLI to generate your AppRouter types:

bash
# Generate types (one-time)
npx nestjs-trpc generate

# Watch mode for development
npx nestjs-trpc watch

How to use

Here's a brief example demonstrating how to use the decorators available in NestJS tRPC:

…

** See full documentation on NestJS-tRPC.io. **

All contributors

NestJS tRPC is developed by Kevin Edry, which taken a huge inspiration from both NestJS and tRPC inner workings.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rustapiexpressnestjstrpc

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类后端框架
定价开源

> 相关工具

N
Node.js
基于 V8 的 JavaScript 运行时
D
Django
Python 高级 Web 框架
S
Spring Boot
Java 生态主流微服务框架