chore: Add dry-run mode and configure logger for operation mode logging
This commit is contained in:
parent
fbe1e4ed05
commit
058ff42b4a
2 changed files with 22 additions and 4 deletions
|
|
@ -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()
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue