All files / config database.js

0% Statements 0/4
0% Branches 0/4
100% Functions 0/0
0% Lines 0/4

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22                                           
const { Sequelize } = require('sequelize');
require('dotenv').config();
 
const sequelize = new Sequelize(process.env.DATABASE_URL || 'postgresql://localhost:5432/crypto_trading_bot', {
  dialect: 'postgres',
  logging: process.env.NODE_ENV === 'development' ? console.log : false,
  pool: {
    max: 20,
    min: 0,
    acquire: 30000,
    idle: 10000
  },
  define: {
    timestamps: true,
    underscored: true,
    freezeTableName: true
  }
});
 
module.exports = sequelize;