Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

272
Views
Unable to connect to postgres using deno.js

Unable to connect to postgres in deno.js.

Here is the configuration:

const dbCreds = {
      applicationName: "appname",
      user: "user_sfhjwre",
      database: "d9iu8mve7nen",
      password: "68790f31eelkhlashdlkagsvADSDa52f9d8faed894c037ef6f9c9f09885603",
      hostname: "ec2-345-34-97-212.eu-east-1.xx.amazonaws.com",
      port: 5432,
    };
    export { dbCreds };

Usage:

import { Client } from "https://deno.land/x/postgres/mod.ts";        
import { dbCreds } from "../config.ts";

const client = new Client(dbCreds);    
await client.connect();

Also tried:

config = "postgres://user@localhost:5432/test?application_name=my_custom_app";
const client = new Client(config);
await client.connect();

Same result:

Uncaught Error: Unknown auth message code 1397113172

Is there anything wrong with the syntax, I can connect to the same db using prisma.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

I have the PostgreSQL server in a remote server and, each time my public IP changes, I need to change the pg_hba.conf in order to set my new public IP as authorized for remote access.

Hope this helps.

Best regards.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!