Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

352
Visualizações
How to connect to a postgreSQL database stored on a server and request this database? Node.js

I am working to develop a server with Node.js to request a postgreSQL database. My problem is, that I can't connect (with my local computer, using wifi connection, not ethernet) to this server, and also to the postgreSQL.

I have an username and a password to connect to the server, and also an another username and password to connect the database.

How can to connect both of those, and get the information I want from the postgreSQL database? Can I connect to this server with command bash like ssh but in node.js?

I did something like this:

var ssh = new SSH({
    host: 'hostname',
    user: 'user',
    pass: 'password'
});

or something like this:

var connectionString = 'postgres://user:password@database:port';

I have another problem, my teacher give me a password containing a @, and I think this will make some problems when I have to put my password:

postgres://user:pass**@**word@database:port

How to bypass this password problem?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

you need to pass ip address of machine where database resides in place of hostname.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda