Open
Description
I had to modify the code to get sequelize to work properly. The issue was caused by srs deploy not properly sending the mysql2 dependency. This was fixed by modifying the db.js file. You may want to add the fix to the repo. But it may also be an issue specific to my setup. Here is the new start of the file:
const Sequelize = require('sequelize')
const NoteModel = require('./models/Note')
const mysql2 = require('mysql2'); // Needed to fix sequelize issues with WebPack
const sequelize = new Sequelize(
process.env.DB_NAME,
process.env.DB_USER,
process.env.DB_PASSWORD,
{
dialect: 'mysql',
dialectModule: mysql2, // Needed to fix sequelize issues with WebPack
host: process.env.DB_HOST,
port: process.env.DB_PORT
}
)
Metadata
Metadata
Assignees
Labels
No labels