31 lines
825 B
JavaScript
31 lines
825 B
JavaScript
/**
|
|
* TypeORM Configuration File
|
|
* Professional NestJS Resume Builder - Database CLI Configuration
|
|
*
|
|
* @author David Valera Melendez <david@valera-melendez.de>
|
|
* @created 2025-08-08
|
|
* @location Made in Germany 🇩🇪
|
|
*/
|
|
|
|
module.exports = {
|
|
type: 'mysql',
|
|
host: process.env.DB_HOST || 'localhost',
|
|
port: parseInt(process.env.DB_PORT) || 3306,
|
|
username: process.env.DB_USER || 'root',
|
|
password: process.env.DB_PASS || '',
|
|
database: process.env.DB_NAME || 'builder_database',
|
|
|
|
entities: ['dist/**/*.entity.js'],
|
|
migrations: ['dist/database/migrations/*.js'],
|
|
migrationsTableName: 'migrations',
|
|
|
|
synchronize: false,
|
|
logging: process.env.NODE_ENV !== 'production',
|
|
|
|
// CLI specific settings
|
|
cli: {
|
|
migrationsDir: 'src/database/migrations',
|
|
entitiesDir: 'src/**/*.entity.ts'
|
|
}
|
|
};
|