Mises à jour relatives à la DB
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user