-
Notifications
You must be signed in to change notification settings - Fork 0
/
knexfile.js
37 lines (35 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
require('dotenv').config();
module.exports = {
// Vendos te dhenat sipas dataBazes tende
development: { //per knex
client: 'mysql2',
connection: //per mysql
{
host: process.env.DB_HOST_NAME,
port:process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_SCHEMA
},
migrations: {
directory: './db/migrations'
// 1:npx knex migrate:make init
// 2:npx knex migrate:latest --env development
},
seeds: {
directory: './db/seeds' //folderi ku do te ruaj DB
//1:npx knex seed:make init
// 2:npx knex seed:run
}
},
test:{
client: 'mysql2',
connection: //for mysql
{
host: "localhost",
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_SCHEMA
}
}
};