1 | const fs = require('fs')
|
2 | const { DATABASE_URL } = require('@sharyn/env')
|
3 |
|
4 | const config = {
|
5 | client: 'pg',
|
6 | connection: DATABASE_URL,
|
7 | migrations: { directory: './src/_db/migrations' },
|
8 | }
|
9 |
|
10 | const seedsPath = './src/_db/seeds'
|
11 | if (fs.existsSync(seedsPath)) {
|
12 | config.seeds = { directory: seedsPath }
|
13 | }
|
14 |
|
15 | module.exports = config
|