move database sync to database
This commit is contained in:
parent
61dfd7ff5c
commit
cd56664442
2 changed files with 6 additions and 6 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
Loading…
Add table
Add a link
Reference in a new issue