add features
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import app from './app';
|
||||
import environment from './config/environment';
|
||||
import logger from './utils/logger';
|
||||
import { testConnection, closePool } from './config/database';
|
||||
import { testConnection, closePool, runMigrations } from './config/database';
|
||||
import { startAuditCleanupJob, stopAuditCleanupJob } from './jobs/audit-cleanup.job';
|
||||
|
||||
const startServer = async (): Promise<void> => {
|
||||
@@ -12,6 +12,9 @@ const startServer = async (): Promise<void> => {
|
||||
|
||||
if (!dbConnected) {
|
||||
logger.warn('Database connection failed - server will start but database operations may fail');
|
||||
} else {
|
||||
// Run pending migrations automatically on startup
|
||||
await runMigrations();
|
||||
}
|
||||
|
||||
// Start the GDPR IP anonymisation job
|
||||
|
||||
Reference in New Issue
Block a user