Use same convex environment for Nextjs/React native app
Hi guys, i'm using convex for my webapp built with nextjs. Now i'm developing a mobile app in react native, and wanted to know if it's possible to share the same backend with convex.
Also i'm using clerk for authentication so i don't know if that can be used as well
Thanks and regards,
Matias
5 Replies
Yes, it is. Look at that example: https://github.com/get-convex/turbo-expo-nextjs-clerk-convex-monorepo
GitHub
GitHub - get-convex/turbo-expo-nextjs-clerk-convex-monorepo: Monore...
Monorepo template with Turborepo, Next.js, Expo, Clerk, Convex - get-convex/turbo-expo-nextjs-clerk-convex-monorepo
Oh ok so itβs only available through monorepo? Is there any way to do this in two separate repos?
with two seperate repos it is not possible to share the same backend code
ig, lol, tell me if im wrong
It's not impossible, but generally comes with caveats. You really want to find a way to get it all in the same repo if you can. Relevant discussion and tips here: https://discord.com/channels/1019350475847499849/1217495727702409328/1217529115515818114
Ian mentions using git subtree as a possible workaround in that thread.
Ok got it! I donβt see any problems into merging both repost into a monorepo, so Iβll take that path, thank you guys! π₯π