=BG= create middleware instead of global static for postgres connection
=BG= improve middleware and add static client to test non-GET requests