Advertisement
Guest User

Untitled

a guest
Jul 17th, 2018
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. const pg = require('pg');
  2. const pool = new pg.Pool({
  3. user: 'sysadmin',
  4. host: '127.0.0.1',
  5. database: 'mywebstore',
  6. password: '123',
  7. port: '5432'});
  8. pool.query "CREATE TABLE users(id SERIAL PRIMARY KEY, firstname VARCHAR(40) NOT NULL,
  9. lastName VARCHAR(40) NOT NULL)", (err, res) => {
  10. console.log(err, res);
  11. pool.end();
  12. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement