Connecting prisma with mongodb issue
Hello, been following docs, used nextjs and i get this error.
DATABASE_URL="mongodb+srv://name:password@cluster0.cnmfhut.mongodb.net/"Raw query failed. Code: `unknown`. Message: `Kind: Command failed: Error code 8000 (AtlasError): empty database name not allowed"use server";
import { PrismaClient } from "@prisma/client";
const prisma = new PrismaClient();
async function Page() {
await prisma.user.create({
data: {
name: "Rich",
email: "hello@prisma.com",
posts: {
create: {
title: "My first post",
body: "Lots of really interesting stuff",
slug: "my-first-post",
},
},
},
});
const allUsers = await prisma.user.findMany({
include: {
posts: true,
},
});
console.dir(allUsers, { depth: null });
return <div>Page</div>;
}
export default Page;