跳至主内容
版本:11.x

示例应用

非官方测试版翻译

本页面由 PageTurner AI 翻译(测试版)。未经项目官方认可。 发现错误? 报告问题 →

备注

虽然可以使用任何列出的包管理器安装这些示例,但所有示例都配置为使用 pnpm 作为脚本运行器,请确保先安装它。

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


Next.js 入门项目(含 Prisma、端到端测试和 ESLint)(推荐)

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 技术栈

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、端到端测试、ESLint、next-auth、WebSockets 和订阅功能)

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

Next.js Todo MVC 示例(含静态生成和 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)


独立服务端与 Node.js 过程调用


Express 服务端与 Node.js 过程调用


支持 WebSockets 的 Fastify 服务端与 Node.js 过程调用


SvelteKit 与 Prisma 整合示例


TanStack Start(Alpha 版)


使用 Express 实现以太坊登录认证

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

前后端分离仓库