Mises à jour relatives à la DB

This commit is contained in:
Rampeur
2025-08-13 01:24:52 +02:00
parent 2f78d85a27
commit e741081966
10 changed files with 27 additions and 30 deletions
+6 -1
View File
@@ -84,6 +84,7 @@ app.use(tags);
app.use(errorHandler);
//console.log(`User: ${User}`);
// Relations
User.belongsToMany(User, {
as: "followers",
@@ -133,7 +134,9 @@ Tag.belongsToMany(Article, {
through: "ArticleTags",
uniqueKey: false,
timestamps: false,
});
})
//Article.sync();
/*
const sync = async () => await sequelize.sync({ force: true });
sync().then(() => {
@@ -155,6 +158,8 @@ sync().then(() => {
});
});
*/
const startServer = async () => {
const port = process.env.SERVER_PORT || 3200;
await promisify(app.listen).bind(app)(port);