Starter Kit for NX, tRPC, Next.js, and Prisma. Well Prisma is optional.
This repo is a starting point for using tRPC in Next.js within a monorepo setup. It allows you to write your server in one place and serve it from wherever you want. Instead of writing a separate REST server, you can use Next.js to handle the server functionality with tRPC.
To install and run the different apps within the monorepo, follow these steps:
npm install -g nx
git clone [repository-url]
nx serve [app-name]
For example, to run app1, use the command:
nx serve app1
If you don’t have NX installed globally, use the following command:
npx nx serve [app-name]
For example:
npx nx serve app1
Note: Each app runs on port 4200, so you will not be able to run all apps simultaneously.
This repo provides a starting point for using tRPC, Prisma, and Next.js within a monorepo setup. It allows you to write your server code in one place and easily serve it using Next.js. The apps within the monorepo demonstrate the usage of tRPC and different routers for querying data. By including Prisma, you can also connect to a database in one of the apps. Overall, this repo showcases the integration of multiple technologies to create a powerful and flexible server-setup for your Next.js applications.