Connecting Go to PostgreSQL with pgx
Today I started connecting the Go backend to PostgreSQL…
I chose pgx because I want to use PostgreSQL and I also want the flexibility of writing raw queries directly.
For this first step, I kept it very simple. The code I added was basically following the example from the README.md of jackc/pgx, where the database connection is initialized directly inside the main() function.
So for now, this is not about architecture yet… just about getting the backend connected to PostgreSQL first and making sure the setup works.
It is still a small step, but it feels important… because once PostgreSQL is connected, I can start thinking about storing deployment state, logs, and other things I will need for this project.