feat: check node env

This commit is contained in:
amhsirak
2025-01-22 19:00:15 +05:30
parent b1d15531e4
commit 75d65578cd

View File

@@ -29,6 +29,7 @@ export const connectDB = async () => {
export const syncDB = async () => {
try {
//setupAssociations();
const isDevelopment = process.env.NODE_ENV === 'development';
await sequelize.sync({ force: false, alter: true }); // force: true will drop and recreate tables on every run
console.log('Database synced successfully!');
} catch (error) {