Skip to main content
Version: 10.x

示例应用

注意

尽管可以使用任何列出的包管理器来安装示例,但这些示例均配置为使用 pnpm 作为脚本运行程序,因此请确保先对其进行 install

¥Although it is possible to install the examples using any of listed package managers, the examples are all configured to use pnpm as the script runner, so make sure to install it first.

如果你希望使用 npmyarn,请确保更新生成示例中的相关 package.json scripts 条目。

¥If you wish to use npm or yarn, make sure to update the relevant package.json scripts entries in generated example.


¥Next.js starter with Prisma, E2E testing, and ESLint (Recommended)

bash
npx create-next-app --example https://github.com/trpc/trpc --example-path examples/next-prisma-starter trpc-prisma-starter
bash
npx create-next-app --example https://github.com/trpc/trpc --example-path examples/next-prisma-starter trpc-prisma-starter

create-t3-turbo - 带有 Expo 和 Turborepo 的 T3 Stack

¥create-t3-turbo - T3 Stack with Expo and Turborepo

bash
git clone git@github.com:t3-oss/create-t3-turbo.git
bash
git clone git@github.com:t3-oss/create-t3-turbo.git

Next.js 入门,使用 Prisma、E2E 测试、ESLint、next-auth、WebSockets 和订阅

¥Next.js starter with Prisma, E2E testing, ESLint, next-auth, WebSockets, and subscriptions

bash
npx create-next-app --example https://github.com/trpc/trpc --example-path examples/next-prisma-websockets-starter trpc-prisma-websockets-starter
bash
npx create-next-app --example https://github.com/trpc/trpc --example-path examples/next-prisma-websockets-starter trpc-prisma-websockets-starter

使用 SSG 和 Prisma 的 Next.js Todo MVC 示例

¥Next.js Todo MVC example with SSG and Prisma

bash
npx create-next-app --example https://github.com/trpc/trpc --example-path examples/next-prisma-todomvc trpc-todo
bash
npx create-next-app --example https://github.com/trpc/trpc --example-path examples/next-prisma-todomvc trpc-todo

Node.js 中的最小(Hello world)服务器和客户端

¥Minimal (Hello world) server and client in Node.js


Vanilla 独立服务器和 Node.js 过程调用

¥Vanilla standalone server and Node.js procedure calls


Express 服务器和 Node.js 过程调用

¥Express server and Node.js procedure calls


具有 WebSockets 和 Node.js 过程调用的 Fastify 服务器

¥Fastify server with WebSockets and Node.js procedure calls


SvelteKit 与 Prisma

¥SvelteKit with Prisma


使用 Express 进行以太坊身份验证登录

¥Sign-In With Ethereum Authentication With Express

bash
git clone git@github.com:codingwithmanny/trpc-siwe-monorepo.git
bash
git clone git@github.com:codingwithmanny/trpc-siwe-monorepo.git

独立的后端和前端存储库

¥Separate backend & frontend repositories