add media model

This commit is contained in:
X4Lo committed 2024-05-17 11:51:11 +01:00
1 parent 76c4e47a38
commit 7e493d8866
6 files changed
+54 -4

No files matched your search

+3 -1
View File
@@ -50,12 +50,14 @@ app.use('/api/v1/media/:category/:type', (req, res, next) => {
// * other api routes
app.use('/api/v1', routes);
// ! Error handling middleware
app.use(errorHandler);
// Start the server
const relations = require('./db/relations.js');
const sequelizeHooks = require('./db/sequelizeHooks.js');
const { initializeGenres, initializeData } = require('./db/dataInitializer.js');
console.log(`Syning database schema...`);
console.log(`Syncing database schema...`);
sequelize
// .sync({force: true}) // will drop all tables and recreate them.
// .sync({ alter: true }) // will attempt to automatically alter tables to fit the model definitions.