BUGFIX: Wasn't cooperating on MERN-template deployment
This commit is contained in:
@@ -4,9 +4,7 @@ const sequelize = new Sequelize(process.env.DB_DATABASE, process.env.DB_USERNAME
|
|||||||
host: process.env.DB_HOSTNAME,
|
host: process.env.DB_HOSTNAME,
|
||||||
dialect: 'mariadb',
|
dialect: 'mariadb',
|
||||||
timezone: process.env.DB_TIMEZONE,
|
timezone: process.env.DB_TIMEZONE,
|
||||||
logging: false
|
// logging: false
|
||||||
});
|
});
|
||||||
|
|
||||||
sequelize.sync();
|
|
||||||
|
|
||||||
module.exports = sequelize;
|
module.exports = sequelize;
|
||||||
@@ -3,6 +3,8 @@ const sequelize = require('..');
|
|||||||
|
|
||||||
const articles = require('./articles');
|
const articles = require('./articles');
|
||||||
|
|
||||||
|
sequelize.sync();
|
||||||
|
|
||||||
const revisions = sequelize.define('revisions', {
|
const revisions = sequelize.define('revisions', {
|
||||||
title: {
|
title: {
|
||||||
type: Sequelize.TEXT,
|
type: Sequelize.TEXT,
|
||||||
|
|||||||
+2
-1
@@ -24,6 +24,7 @@ app.get('*', (req, res) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
//startup
|
//startup
|
||||||
server.listen(process.env.WEB_PORT || 3100, (err) => {
|
server.listen(process.env.WEB_PORT || 3100, async (err) => {
|
||||||
|
await database.sync();
|
||||||
console.log(`listening to localhost:${process.env.WEB_PORT || 3100}`);
|
console.log(`listening to localhost:${process.env.WEB_PORT || 3100}`);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user