X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2FHelpers.ts;h=99a8f82cb5dca431de4f3c6f49ca044129f16c7e;hb=c0a330785a8f27f5a3e889251829497a2538ebef;hp=90ecd0e8154814c6a2be8f70c6b508690f59c096;hpb=8664faa4267611c6f15a5e0d7cd77c6ba72eb7ce;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/Helpers.ts b/src/charging-station/Helpers.ts index 90ecd0e8..99a8f82c 100644 --- a/src/charging-station/Helpers.ts +++ b/src/charging-station/Helpers.ts @@ -1,6 +1,7 @@ import { createHash, randomBytes } from 'node:crypto'; import type { EventEmitter } from 'node:events'; import { basename, dirname, join } from 'node:path'; +import { env } from 'node:process'; import { fileURLToPath } from 'node:url'; import chalk from 'chalk'; @@ -76,7 +77,7 @@ export const getChargingStationId = ( stationTemplate: ChargingStationTemplate, ): string => { // In case of multiple instances: add instance index to charging station id - const instanceIndex = process.env.CF_INSTANCE_INDEX ?? 0; + const instanceIndex = env.CF_INSTANCE_INDEX ?? 0; const idSuffix = stationTemplate?.nameSuffix ?? ''; const idStr = `000000000${index.toString()}`; return stationTemplate?.fixedName