move database sync to database

This commit is contained in:
counterweight 2025-02-09 18:12:09 +01:00
parent 61dfd7ff5c
commit cd56664442
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
2 changed files with 6 additions and 6 deletions

View file

@ -5,12 +5,6 @@ const path = require('path');
const sequelize = require('./database');
const Session = require('./models/Session');
sequelize.sync().then(() => {
console.log('Database synced');
}).catch(err => {
console.error('Error syncing the database:', err);
});
const app = express();
const port = 3000;

View file

@ -16,4 +16,10 @@ const sequelize = new Sequelize({
},
});
sequelize.sync().then(() => {
console.log('Database synced');
}).catch(err => {
console.error('Error syncing the database:', err);
});
module.exports = sequelize;