Files
MERN-template/server/database/index.js
T
Ratstail91 488f975e98 Fixex the deployment issues, read more
The deployment issues were caused by sequelize running out-of-order.
I fixed this by placing sequelize.sync() in correct locations.

I've also updated news-server with these changes.

I've also removed mariadb stuff from the game server's Dockerfile.

Resolved #1
2021-03-03 23:32:27 +00:00

13 lines
309 B
JavaScript

const Sequelize = require('sequelize');
const sequelize = new Sequelize(process.env.DB_DATABASE, process.env.DB_USERNAME, process.env.DB_PASSWORD, {
host: process.env.DB_HOSTNAME,
dialect: 'mariadb',
timezone: process.env.DB_TIMEZONE,
// logging: false
});
sequelize.sync();
module.exports = sequelize;