generated from BloomTech-Labs/template-be
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathknexfile.js
38 lines (34 loc) · 923 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
const { DATABASE_URL } = require("./env.js"),
testDB = require("./data/knex/knextest");
module.exports = {
development: {
client: "pg",
connection: DATABASE_URL,
migrations: { directory: "./data/migrations" },
seeds: { directory: "./data/seeds" }
},
test: {
client: "pg",
connection: testDB,
migrations: { directory: "./data/migrations" },
seeds: { directory: "./data/seeds" }
},
staging: {
client: "pg",
connection: {
host: process.env.RDS_HOSTNAME,
user: process.env.RDS_USERNAME,
password: process.env.RDS_PASSWORD,
port: process.env.RDS_PORT,
database: "postgres"
},
migrations: { directory: "./data/migrations" },
seeds: { directory: "./data/seeds" }
},
production: {
client: "pg",
connection: DATABASE_URL,
migrations: { directory: "./data/migrations" },
seeds: { directory: "./data/seeds" }
}
};