mysql.js 337 B

12345678910111213141516171819202122
  1. module.exports = function ( app ) {
  2. this.mysqlConn = function () {
  3. const Sequelize = require('sequelize');
  4. const sequelizeConn = new Sequelize({
  5. database: 'monitora',
  6. username: 'root',
  7. password: null,
  8. dialect: 'mysql',
  9. logging: false,
  10. });
  11. return sequelizeConn;
  12. }
  13. return this;
  14. }