chore: Add dry-run mode and configure logger for operation mode logging

This commit is contained in:
Andreas Hilbig 2026-01-13 14:51:40 +01:00
parent fbe1e4ed05
commit 058ff42b4a
2 changed files with 22 additions and 4 deletions

View file

@ -1,5 +1,14 @@
import {startAPi} from "./api/start.js";
import {logger} from "./logging/logger.js";
// Determine and log the operation mode first:
// Controller and api share the same code base
// but may run independently
if (process.env.DRY_RUN) {
logger.info("Dry run mode - exiting directly without starting anything")
process.exit(0)
}
startAPi()