Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const { Pool } = require('pg');
- const createPool = mode => {
- if (mode === 'prod') {
- return new Pool();
- } else if (mode === 'test') {
- return new Pool({
- user: 'something',
- host: 'localhost',
- database: 'something',
- password: 'something',
- port: 5432
- })
- }
- };
- module.exports = createPool;
Add Comment
Please, Sign In to add comment