Postman GET on Fly Postgres

hello, I’m a student in development.
I’m trying to learn the benefits of fly.io and I’ve started a db on a flyApp and I’ve tried to make a simple API call with postman on it.

GET postgres://user:password@hostname:5432
Error: Invalid protocol: postgres:   

How can I reach my db created with Fly Postgres ?

You wouldn’t do a GET request directly to the database, you’d do a GET request to your app you created, which would query the database and return results

1 Like


I went to the vapor’s discord community also to check if I’m not going on the wrong way

Oh awesome you’re using Vapor! That’s one I know! lol

You’ll create an API endpoint, a route, that will query your database. What comes in the hello world project, looks like this:

app.get("hello") { req async -> String in
   "Hello, world!"
}