diff options
| author | Adam Soltys <[email protected]> | 2022-09-23 07:32:33 +0000 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-09-23 07:32:33 +0000 |
| commit | 09ff8b746a357451b8ec384d19d7620a32414d44 (patch) | |
| tree | 86bf9423c7e082b045e5bceb26d2b53cb603b073 /db | |
| parent | 06e142288d553900d8119029936aabe93e13b76b (diff) | |
| parent | 883e624d4d645b6b1c1f4b85c4bea4625ba5b046 (diff) | |
| download | coinos-server-09ff8b746a357451b8ec384d19d7620a32414d44.tar.gz coinos-server-09ff8b746a357451b8ec384d19d7620a32414d44.zip | |
Merge branch 'prod2' into prod
Diffstat (limited to 'db')
| -rw-r--r-- | db/db.js | 14 | ||||
| -rw-r--r-- | db/index.js | 1 | ||||
| l--------- | db/knexfile.js | 1 |
3 files changed, 3 insertions, 13 deletions
@@ -1,13 +1,5 @@ import Sequelize from "@sequelize/core"; -import dbOptions from "../config/knexfile"; +import config from "$config"; -let { database, user, password, host } = dbOptions[ - process.env.NODE_ENV -].connection; - -export default new Sequelize(database, user, password, { - host, - dialect: "mariadb", - logging: false, - dialectOptions: { multipleStatements: true, timezone: "Etc/GMT+7" } -}); +let { database, user, password, options } = config.db; +export default new Sequelize(database, user, password, options); diff --git a/db/index.js b/db/index.js index 3d5aab36..8c94a4d3 100644 --- a/db/index.js +++ b/db/index.js @@ -1,7 +1,6 @@ import Sequelize from "@sequelize/core"; import db from "$db/db"; -import dbOptions from "$config/knexfile"; db.authenticate().catch(err => { console.debug("Error connecting to database: " + err.message); diff --git a/db/knexfile.js b/db/knexfile.js deleted file mode 120000 index 3cf75ae7..00000000 --- a/db/knexfile.js +++ /dev/null @@ -1 +0,0 @@ -./../config/knexfile.js
\ No newline at end of file |
