How to "deactivate" the database (Prisma) component? #29
Replies: 1 comment
-
Just so I completely understand, the problem is that for pages that don't require any interaction with a DB/auth(ie. landing page), when your DB is not live, you should theoretically get no errors, but you're getting a blank screen error right? It seems that the problem is that somewhere in your app, you're doing a trpc call to the backend, which contains a prisma.entry.findMany() function. So, to solve this, it sounds obvious, but I'd recommend finding where you're making that call, and ensuring that your app isn't calling the db when you aren't connected! If you have not modified much of the template, it could be the following line in HomeScreen() Since this isn't a real-time database, your client is not directly establishing a connection with the database. We're just making HTTP calls to our backend, which is "connected" to the DB. So, if you just remove all of the HTTP request attempts in the frontend this should be resolved! note: sry this response took a while, didn't realize there was a post in Discussions 🤐 |
Beta Was this translation helpful? Give feedback.
-
Hi,
If I want to create a page that doesn't require auth/databases, how do I configure the project so that it no longer tries to connect to a database? I thought it might not be a noticeable problem if I just ignored it, as the only effect was this message loading whenever I interact with the site after calling "yarn web".
However, occasionally the screen goes blank and is replaced by the following,
How do I remove the database portion so that this message doesn't appear anymore?
Beta Was this translation helpful? Give feedback.
All reactions