new features

This commit is contained in:
Matthias Hochmeister
2026-03-23 13:08:19 +01:00
parent 83b84664ce
commit 5032e1593b
41 changed files with 5157 additions and 40 deletions

View File

@@ -4,6 +4,7 @@ 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';
import { startReminderJob, stopReminderJob } from './jobs/reminder.job';
import { permissionService } from './services/permission.service';
const startServer = async (): Promise<void> => {
@@ -28,6 +29,9 @@ const startServer = async (): Promise<void> => {
// Start the notification generation job
startNotificationJob();
// Start the order reminder job
startReminderJob();
// Start the server
const server = app.listen(environment.port, () => {
logger.info('Server started successfully', {
@@ -51,6 +55,7 @@ const startServer = async (): Promise<void> => {
// Stop scheduled jobs first
stopAuditCleanupJob();
stopNotificationJob();
stopReminderJob();
server.close(async () => {
logger.info('HTTP server closed');