examples next prisma starter
1.0.0
pnpm create next-app --example https://github.com/trpc/trpc --example-path examples/next-prisma-starter trpc-prisma-starter
cd trpc-prisma-starter
pnpm
pnpm dxpnpm create next-app --example https://github.com/trpc/trpc --example-path examples/next-prisma-starter trpc-prisma-starter
cd trpc-prisma-starter
pnpm
pnpm dxpnpm build # runs `prisma generate` + `prisma migrate` + `next build`
pnpm db-reset # resets local db
pnpm dev # starts next.js
pnpm dx # starts postgres db + runs migrations + seeds + starts next.js
pnpm test-dev # runs e2e tests on dev
pnpm test-start # runs e2e + unit tests
pnpm test-unit # runs normal Vitest unit tests
pnpm test-e2e # runs e2e tests 該項目包含一個render.yaml “藍圖” ,這使得該項目在渲染上很容易部署。
請訪問dashboard.render.com/blueprints,然後連接到此藍圖,然後查看應用程序和數據庫如何自動部署。
| 小路 | 描述 |
|---|---|
./prisma/schema.prisma | Prisma模式 |
./src/pages/api/trpc/[trpc].ts | TRPC響應處理程序 |
./src/server/routers | 您的應用程序不同的trpc-routers |
由@alexdotjs創建。