Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var pg = require('pg');
- var pool = new pg.Pool({
- host: 'localhost',
- user: 'postgres',
- password: '111111',
- database: 'chat',
- port: '5432'
- });
- pool.connect(function(err, client, done) {
- console.log(err.message);
- client.query("SELECT id, user_id, name FROM public.chat;", function(err, results) {
- done();
- result = results.rows[1];
- });
- });
Add Comment
Please, Sign In to add comment