minimonolith 0.13.7 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +2 -5
- package/package.json +1 -1
- package/src/database/databaseService.js +6 -4
package/.env.example
CHANGED
package/package.json
CHANGED
|
@@ -27,11 +27,13 @@ const establishConnection = async ORM => {
|
|
|
27
27
|
|
|
28
28
|
const registerDatabaseService = async API => {
|
|
29
29
|
try {
|
|
30
|
-
const { MM_API_DB_DIALECT, MM_API_DB_DB, MM_API_DB_USER,
|
|
31
|
-
|
|
30
|
+
const { MM_API_DB_DIALECT, MM_API_DB_DB, MM_API_DB_USER,
|
|
31
|
+
MM_API_DB_PASS, MM_API_DB_HOST, MM_API_DB_PORT, MM_API_DB_STORAGE } = process.env;
|
|
32
|
+
const SEQUELIZE_OPTIONS = { dialect: MM_API_DB_DIALECT, host: MM_API_DB_HOST,
|
|
33
|
+
port: MM_API_DB_PORT, storage: MM_API_DB_STORAGE, logging: false };
|
|
32
34
|
|
|
33
|
-
if (!process.env.PROD_ENV) console.log({ ROUTE_CODE,
|
|
34
|
-
|
|
35
|
+
if (!process.env.PROD_ENV) console.log({ ROUTE_CODE, MM_API_DB_VARS: { MM_API_DB_DIALECT,
|
|
36
|
+
MM_API_DB_USER, MM_API_DB_PASS, MM_API_DB_HOST, MM_API_DB_PORT, MM_API_DB_DB, MM_API_DB_STORAGE }});
|
|
35
37
|
API.ORM = new Sequelize(MM_API_DB_DB, MM_API_DB_USER, MM_API_DB_PASS, SEQUELIZE_OPTIONS);
|
|
36
38
|
establishConnection(API.ORM);
|
|
37
39
|
|