https://github.com/omer-os/trpc-express-prisma-setup
Express, tRPC, and Prisma Example
https://github.com/omer-os/trpc-express-prisma-setup
expressjs prisma trpc typesc
Last synced: 3 months ago
JSON representation
Express, tRPC, and Prisma Example
- Host: GitHub
- URL: https://github.com/omer-os/trpc-express-prisma-setup
- Owner: omer-os
- Created: 2024-09-13T21:05:12.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-13T21:18:57.000Z (almost 2 years ago)
- Last Synced: 2025-01-28T22:48:56.779Z (over 1 year ago)
- Topics: expressjs, prisma, trpc, typesc
- Language: TypeScript
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Express, tRPC, and Prisma Example
This is a simple example of how to use Express, tRPC, and Prisma ORM together. It includes an authentication router with endpoints for login, registration, logout, and token refresh. The schema is defined in the `prisma/schema.prisma` file. this code also includes validation with zod.
## Getting Started
1. Clone the repository.
2. Install dependencies using `pnpm install`.
3. Add the required environment variables.
4. Push the schema to the database with `pnpm prisma db push`.
5. Generate the Prisma client with `pnpm prisma generate`.
6. Start the server with `pnpm dev`.