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
{"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
make sure your database server is running at
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!
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\nPleasemake 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!