Switch to central config loader using mounted secret files.
This commit is contained in:
@@ -3,6 +3,7 @@ import { createInterface } from 'node:readline';
|
||||
import XXH from 'xxhashjs';
|
||||
import { log } from './logger.js';
|
||||
import { DataIngressPisData } from '@owlboard/backend-data-contracts';
|
||||
import type { GeneralConfig } from './config.js';
|
||||
|
||||
const BASE_URL = process.env.BASEURL || 'https://owlboard.info'
|
||||
|
||||
@@ -18,8 +19,8 @@ interface InputRecord {
|
||||
stops: string[];
|
||||
}
|
||||
|
||||
export async function* processPisStream(inputStream: Readable) {
|
||||
const TOC = process.env.TOC;
|
||||
export async function* processPisStream(cfg: GeneralConfig, inputStream: Readable) {
|
||||
const TOC = cfg.TOC;
|
||||
if (!TOC) {
|
||||
log('ERROR', "TOC not set: Exit code 19");
|
||||
process.exit(19);
|
||||
|
||||
Reference in New Issue
Block a user