"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AppDataSource = exports.typeOrmConfig = exports.dataSourceOptions = void 0;
const path_1 = require("path");
const typeorm_1 = require("typeorm");
exports.dataSourceOptions = {
    type: "mysql",
    host: process.env.DB_HOST || "localhost",
    port: parseInt(process.env.DB_PORT || "3306", 10),
    username: process.env.DB_USERNAME || "mokter",
    password: process.env.DB_PASSWORD || "Amijanina@1998",
    database: process.env.DB_DATABASE || "demo",
    entities: [(0, path_1.join)(__dirname, "../**/*.entity{.ts,.js}")],
    migrations: [(0, path_1.join)(__dirname, "../migrations/*{.ts,.js}")],
    migrationsTableName: "typeorm_migrations",
    synchronize: false,
};
exports.typeOrmConfig = {
    ...exports.dataSourceOptions,
};
exports.AppDataSource = new typeorm_1.DataSource(exports.dataSourceOptions);
//# sourceMappingURL=ormconfig.js.map