add features

This commit is contained in:
Matthias Hochmeister
2026-03-03 17:01:53 +01:00
parent 92b05726d4
commit 5a6fc85a75
30 changed files with 1104 additions and 198 deletions

View File

@@ -3,6 +3,7 @@ import environment from './config/environment';
import logger from './utils/logger';
import { testConnection, closePool, runMigrations } from './config/database';
import { startAuditCleanupJob, stopAuditCleanupJob } from './jobs/audit-cleanup.job';
import { startNotificationJob, stopNotificationJob } from './jobs/notification-generation.job';
const startServer = async (): Promise<void> => {
try {
@@ -20,6 +21,9 @@ const startServer = async (): Promise<void> => {
// Start the GDPR IP anonymisation job
startAuditCleanupJob();
// Start the notification generation job
startNotificationJob();
// Start the server
const server = app.listen(environment.port, () => {
logger.info('Server started successfully', {
@@ -35,6 +39,7 @@ const startServer = async (): Promise<void> => {
// Stop scheduled jobs first
stopAuditCleanupJob();
stopNotificationJob();
server.close(async () => {
logger.info('HTTP server closed');