Hi all, I'm attempting to connect Prisma to a loca...
# orm-help
l
Hi all, I'm attempting to connect Prisma to a local mongo container to run my test suite, but the connection to
<mongodb://localhost:27017/>
fails. Connection code (it works with a mongoAtlas db):
const prisma = new PrismaClient({ datasources: { db: { url } } });
await prisma.$connect();
I'm getting errors:
Error parsing connection string: Database must be defined in the connection string
I'm must be missing something obvious, thx for your help.
a
Hey there 👋 , Prisma is expecting a connection string in the format in the attached picture. Have you tried appending your database name at the end of the connection string?
✅ 1
l
@Austin thx a lot for your help! It was indeed obvious, should have checked the docs more carefully.