moved into src

This commit is contained in:
counterweight 2025-02-08 16:12:54 +01:00
parent ca2b2f2e8d
commit d8a72e5978
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
6 changed files with 4 additions and 3 deletions

18
src/database.js Normal file
View file

@ -0,0 +1,18 @@
const { Sequelize } = require('sequelize');
const sequelize = new Sequelize({
dialect: 'sqlite',
storage: './data/database.sqlite',
define: {
timestamps: false,
freezeTableName: true
},
});
sequelize.sync().then(() => {
console.log('Database synced');
}).catch(err => {
console.error('Error syncing the database:', err);
});
module.exports = sequelize;