P
Prisma•5mo ago
shazal99

Prisma Pulse with nextjs

Did anyone ever try this? i did try but im not sure where should i run the prisma pulse in my apps. API? Direct in page.tsx?
1 Reply
RaphaelEtim
RaphaelEtim•5mo ago
Hi @shazal99 👋 If you are building a backend API, you can run Prisma Pulse in your API routes. This is useful for server-side processing and ensures that your backend can handle real-time events. For serverless environments or cron jobs, you can run the Pulse stream in a server-side script. This is useful for tasks that do not require immediate real time processing but need to ensure eventual consistency. You can check out the Prisma Pulse examples repository to see how to integrate Pulse into an app.
GitHub
GitHub - prisma/prisma-examples: 🚀 Ready-to-run Prisma example proj...
🚀 Ready-to-run Prisma example projects. Contribute to prisma/prisma-examples development by creating an account on GitHub.

Did you find this page helpful?