-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathknexfile.js
41 lines (37 loc) · 977 Bytes
/
knexfile.js
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
38
39
40
41
const path = require('path');
require('dotenv').config();
// Update with your config settings.
module.exports = {
development: {
client: 'mysql2',
connection: {
host: process.env.DB_DEV_HOST,
port: process.env.DB_DEV_PORT,
database: process.env.DB_DEV_DB,
user: process.env.DB_DEV_USER,
password: process.env.DB_DEV_PASS,
},
migrations: {
directory: path.join(__dirname, '/database/migrations'),
},
seeds: {
directory: path.join(__dirname, '/database/seeds'),
},
},
production: {
client: 'mysql2',
connection: {
host: process.env.DB_PROD_HOST,
port: process.env.DB_PROD_PORT,
database: process.env.DB_PROD_DB,
user: process.env.DB_PROD_USER,
password: process.env.DB_PROD_PASS,
},
migrations: {
directory: path.join(__dirname, '/database/migrations'),
},
seeds: {
directory: path.join(__dirname, '/database/seeds'),
},
},
};