add relation between models

This commit is contained in:
X4Lo committed 2024-04-01 07:31:05 +00:00
1 parent 203aca7c65
commit bf0378e895
2 files changed
+74 -10

No files matched your search

+4 -4
View File
@@ -32,13 +32,13 @@ app.use('/api/v1', routes);
const relations = require('./db/relations.js')
sequelize
.sync({force: true})
// .sync({force: true})
.sync({ alter: true })
.then((result) => {
// console.log(result);
app.listen(PORT, () => {
const Entry = require("./models/Entry.js")
Entry.create({title: "Avengers Endgame"})
console.log(`Server running on http://localhost:${PORT}`);
//const Entry = require("./models/Entry.js")
console.log(`Backend server running on http://localhost:${PORT}`);
});
})
.catch(err => {