Hi, I've recently started getting an error when trying to make requests to my server.
I suspect this has to do with Fluent (I'm using psql) but honestly not sure what is the root cause. I am getting the same issue with a project I have been working on for a couple of weeks and on a new test project.
The server starts up fine with no errors. However, when trying to make any requests I get this error. It also occurs when running tests.
The error message shows it's trying to connect to a database server on localhost port 5432 but there's nothing listening on it. How are you running your DB server?
This is not an error that you will see if you connect to a DB from Postico
This is the error I am getting in the swift console when I try connect to the db using Postico:
[ DEBUG ] Invalid HTTP request, will close connection: invalid HTTP method (Vapor/HTTPServerRequestDecoder.swift:150)
I was just relying on it starting up with the project. I think I managed to fix the Postico connection after your question about how I run my DB by running - brew services start postgresql. This is all local and I still have never deployed it - so that should be fun in the future.
Including curl yes. I have managed to fix the Postico connection and I will try to confirm the curl again and see if my client can finally connect - sorry need to run off to work right now.
Okay I can confirm it works now - looks like I needed to start the DB manually even though before it started up automatically with the project? - that might be my mis-remembrance though of how I started it up for the first time a few months back.
Im closing this. Thanks for taking the time to comment @vanvoorden@0xTim