16 lines
499 B
JavaScript
16 lines
499 B
JavaScript
const Sequelize = require("sequelize");
|
||
|
||
const Database = new Sequelize(process.env.DB_NAME, process.env.DB_USER, process.env.DB_PASS, {
|
||
host: process.env.DB_HOST,
|
||
// port: DatabaseConfig.db_port,
|
||
dialect: process.env.DB_DIAL,
|
||
// storage: DatabaseConfig.db_storage
|
||
});
|
||
|
||
Database.authenticate().then(() => {
|
||
console.log('Veritabanı Bağlantısı Başarılı');
|
||
}).catch((error) => {
|
||
console.error('Veritabanı Bağlantısı Hatalı: ', error);
|
||
});
|
||
|
||
module.exports = Database; |