Hi everyone! I’m in need of some help handling connections from my express server to my postgres db in my web app.
I’m a newbie and still trying to find out how to best handle connections to the database.
Some background info
I’m currently using .sql files to create users and roles. I have 3 different users created inside of postgres, 1) writer_user 2) reader_user 3) remover_user. Each user has specific permissions to their name (i.e., reader only has SELECT permissions to the specific schema). I’m currently creating 3 different connections to the pg database in the express server to handle the different connections.
Does it make sense to handle these 3 connections in this way? Should I even be making these different users or should it just be 1 postgres user with SELECT, INSERT, UPDATE, and DELETE permissions?