Spleen
Explore posts from serversPPrisma
•Created by Spleen on 7/18/2024 in #help-and-questions
How do I go about seeding with the D1 adapter?
Hey all, I have recently started using the D1 adapter and I am a bit confused around how seeding should be handled. Initially I thought it would be the same as other DB's so I was following the guide here: https://www.prisma.io/docs/orm/prisma-migrate/workflows/seeding#seeding-your-database-with-typescript-or-javascript. The issue is when using the D1 adapter it requires a binding to the D1 database instance which comes from the Cloudflare workers context. Since the seed script would run outside of the workers context, is there anyway to provide an access token or something similar to connect to the D1 database instead? My current solution is a simple worker that handles the seeding, but this has its own issues as there is a limit to the amount of sub-requests (50/request).
2 replies
KKinde
•Created by Spleen on 7/14/2024 in #💻┃support
How can I get the users JWT token after logging when using the Nuxt module?
Hey, i'm using the Nuxt module and I am trying to get the JWT token after login so I can pass it through to my Cloudflare Workers API in the Authorization header. Is this possible? I can't find anything in the Nuxt Module documentation that says how to access the token.
4 replies