Guest User

Untitled

a guest
Oct 29th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. const { Client } = require('pg')
  2.  
  3.  
  4. const client = new Client({
  5. host: "ec2-75-101-138-26.compute-1.amazonaws.com",
  6. database: "dbpf06v32e9e03",
  7. user: "bliknxhjnmtbmz",
  8. password: 'b7d2461e6bf72f2f1edbb2c96e9e211fe6128e3cebc505455768e3d17729aa2f',
  9. port: 5432,
  10. ssl: true
  11. //connectionString: connectionString
  12. })
  13.  
  14. client.connect()
  15. console.log(client.connect())
  16. let salida = client.query('SELECT * FROM register;', (err, res) =>
  17. {
  18. console.log(salida);
  19. client.end()
  20. })
  21. //console.log(salida)
Add Comment
Please, Sign In to add comment