-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy pathknexfile.js
42 lines (42 loc) · 1.05 KB
/
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
42
let config = require('./config/index')
// In terminal open psql and create a new database. Then include the name of the database and your username and password in the development details below
// Run the following terminal command
// $ psql
// # CREATE DATABASE nameofyourdatabase;
// Note: remember the semicolon syntax
// # \q
module.exports = {
development: {
client: 'pg',
connection: {
host: 'localhost',
user: 'howardmann',
password: null,
database: 'clean_node_example',
port: 5432
},
migrations: {
directory: __dirname + '/db/pg/migrations'
},
seeds: {
directory: __dirname + '/db/pg/seeds/development'
}
},
production: {
client: 'pg',
connection: {
host: config.pg.HOST,
user: config.pg.USER,
password: config.pg.PASSWORD,
database: config.pg.DATABASE,
port: config.pg.PORT,
ssl: true
},
migrations: {
directory: __dirname + '/db/pg/migrations'
},
seeds: {
directory: __dirname + '/db/pg/seeds/production'
}
}
};