text: const fs = require('fs');
  const path = require('path');
  const Sequelize = require('sequelize');
  const config = require('../config/config');
  const db = {}
  
  const sequelize = new Sequelize(
      config.db.database,
      config.db.user,
      config.db.password,
      config.db.options
  )
  
  
      fs
      .readdirSync(__dirname)
      .filter((file) =>
        file !== 'index.js'
      )
      .forEach((file) => {
        const model = sequelize.import(path.join(__dirname, file))
        console.log("model " + model)
        try{
          db[model.name] = model
          console.log("working")
        }catch(err){
            console.error(err)
        }
        
      })
    
  db.sequelize = sequelize;
  db.Sequelize = Sequelize;
  
  /*
      db : {
          sequelize : sequelize,
          Sequelize : Sequelize
      }
      */
  module.exports = db;
  