Alexcitten
Explore posts from serversPPrisma
•Created by Alexcitten on 7/7/2024 in #help-and-questions
Can't reach database server at localhost:5432
PostgreSQL 16, I'm implementing OpenAPI on Cloudfare Workers using TypeScript, I did an endpoint and it shows an error
PrismaClientKnownRequestError: Invalid
prisma.clientProfile.create()
invocation: This request could not be understood by the server:
{"type":"UnknownJsonError","body":{"code":"P6008","message":"Accelerate was not able to connect to
your database. The underlying error is: Can't reach database server at localhost:5432
\n\nPlease
make sure your database server is running at localhost:5432
."}}
I don't understand what the error is because my seeding is working correctly, the whole database setup seems to be correct, next I will give more input from my app
Endpoint:
schema:
../../prisma/prisma:
.env:
DIRECT_DATABASE_URL="postgresql://postgres:postgres@localhost:5432/postgres?schema=public"
DATABASE_URL="prisma://accelerate.prisma-data.net/?api_key=apikey"
When using endpoint, in my pgAdmin 4 database I see activity from connections, the correct link is connected to my database in Accelerate, but I get this error.
my seed.ts, which works just fine:
Open to any discussion, I really want to get this fixed. Thank you!4 replies