-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathknexfile.ts
More file actions
37 lines (34 loc) · 889 Bytes
/
Copy pathknexfile.ts
File metadata and controls
37 lines (34 loc) · 889 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import path from 'path';
import dotenv from 'dotenv';
import { Knex } from 'knex';
dotenv.config();
export const development: Knex.Config = {
client: 'pg',
connection: {
host: '127.0.0.1',
user: process.env.DEV_DB_USER,
password: process.env.DEV_DB_PASS,
database: process.env.DEV_DB_NAME,
},
migrations: {
directory: path.join(__dirname, '/db/migrations')
},
seeds: {
directory: path.join(__dirname, '/db/seeds')
}
};
export const test: Knex.Config = {
client: 'pg',
connection: {
host: '127.0.0.1',
user: process.env.TEST_DB_USER,
password: process.env.TEST_DB_PASS,
database: process.env.TEST_DB_NAME,
},
migrations: {
directory: path.join(__dirname, '/db/migrations')
},
seeds: {
directory: path.join(__dirname, '/db/seeds')
}
};