23 lines
874 B
JavaScript
23 lines
874 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.ormConfig = void 0;
|
|
const path_1 = require("path");
|
|
const app_env_1 = require("../app.env");
|
|
const typeorm_1 = require("typeorm");
|
|
const entities = (0, path_1.join)(__dirname, '../model/**/*.model.{j,t}s');
|
|
const migrations = (0, path_1.join)(__dirname, '../migration/**/*.{j,t}s');
|
|
exports.ormConfig = {
|
|
type: 'mysql',
|
|
host: app_env_1.AppEnv.MYSQL_HOST,
|
|
port: app_env_1.AppEnv.MYSQL_PROT,
|
|
username: app_env_1.AppEnv.MYSQL_USERNAME,
|
|
password: app_env_1.AppEnv.MYSQL_PASSWORD,
|
|
database: app_env_1.AppEnv.MYSQL_DATABASE,
|
|
synchronize: true,
|
|
logging: false,
|
|
entities: [entities],
|
|
migrations: [migrations],
|
|
};
|
|
const connectionSource = new typeorm_1.DataSource(exports.ormConfig);
|
|
exports.default = connectionSource;
|
|
//# sourceMappingURL=orm.config.js.map
|