add relation between models
This commit is contained in:
1 parent
203aca7c65
commit
bf0378e895
2 files changed
+74
-10
No files matched your search
+4
-4
@@ -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 => {
|
||||
|
||||
Reference in new issue
Block a user