R
Railway7mo ago
lasse

MongoDB prisma

When ever i try to connect my mongodb with prisma i does not work :( when i genarate the schema it gave my 0 issues. but when i run my appication and it gives me this error on the img Here is my connection url format: mongodb://<user>:<pass>@monorail.proxy.rlwy.net:16184/test
No description
Solution:
I will switch to postgresql
Jump to solution
13 Replies
Percy
Percy7mo ago
Project ID: N/A
lasse
lasseOP7mo ago
When i add the ?authSource=admin at the end it allows reading but not writing? Then i get this error: Prisma needs to perform transactions, which requires your MongoDB server to be run as a replica set. https://pris.ly/d/mongodb-replica-set
Brody
Brody7mo ago
mongo Databases on railway are not run as a replica set, meaning you can't use them with prisma from what I've heard
lasse
lasseOP7mo ago
Arr alright. Thanks!
Deleted user
Deleted user5mo ago
I can't use mongo with prisma if I want to host on railway?
Brody
Brody5mo ago
not with the default mongo database, you would need to deploy this template into your project - https://railway.app/template/gFmvuY
Solution
Deleted user
Deleted user5mo ago
I will switch to postgresql
Brody
Brody5mo ago
good choice
Deleted user
Deleted user5mo ago
No description
Deleted user
Deleted user5mo ago
yes I'm sure it's 5432
Brody
Brody5mo ago
I can promise you that the database on railway is not running at localhost
Deleted user
Deleted user5mo ago
Will I have to host my database?
Brody
Brody5mo ago
yes of course but I'm going to lock this thread as it is going out of scope
Want results from more Discord servers?
Add your server