Guest User

Untitled

a guest
Feb 10th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. const { Pool } = require('pg');
  2.  
  3.  
  4. const createPool = mode => {
  5. if (mode === 'prod') {
  6. return new Pool();
  7. } else if (mode === 'test') {
  8. return new Pool({
  9. user: 'something',
  10. host: 'localhost',
  11. database: 'something',
  12. password: 'something',
  13. port: 5432
  14. })
  15. }
  16. };
  17.  
  18. module.exports = createPool;
Add Comment
Please, Sign In to add comment