Merging Routers
Writing all API-code in your code in the same file is not a great idea. It's easy to merge routers with other routers.
Thanks to TypeScript 4.1 template literal types we can also prefix the procedures without breaking typesafety.
Working example
- Code at /examples/next-prisma-starter/src/server/routers/app.ts
- All code for posts living in a separate router and namespaced with post.
Example code
server.tsts
server.tsts