-
Notifications
You must be signed in to change notification settings - Fork 0
/
knexfile.js
47 lines (38 loc) · 985 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
42
43
44
45
46
47
// Update with your config settings.
const dotenv = require('dotenv');
const assert = require('assert');
dotenv.config();
const {SQL_USER, SQL_PASSWORD, SQL_DATABASE, SQL_SERVER,SQL_PORT} = process.env;
const sqlEncrypt = process.env.SQL_ENCRYPT === "true";
// module.exports = {
// development: {
// client: 'mssql',
// connection: {
// user: SQL_USER,
// password: SQL_PASSWORD,
// server: SQL_SERVER,
// port: Number(SQL_PORT),
// database: SQL_DATABASE,
// options: {
// encrypt: sqlEncrypt,
// enableArithAbort: true
// },
// },
// useNullAsDefault: true
// },
// };
const knex = require('knex')({
client: 'mssql',
connection: {
user: SQL_USER,
password: SQL_PASSWORD,
server: SQL_SERVER,
port: Number(SQL_PORT),
database: SQL_DATABASE,
options: {
encrypt: sqlEncrypt,
enableArithAbort: true
},
},
});
module.exports = knex