Adjusted for older versions of express and pg modules