- try {
- this.initializeCounters();
- this.initializeWorkerImplementation();
- await this.workerImplementation?.start();
- await this.storage?.open();
- this.uiServer?.start();
- const stationTemplateUrls = Configuration.getStationTemplateUrls();
- // Start ChargingStation object instance in worker thread
- for (const stationTemplateUrl of stationTemplateUrls) {
- try {
- const nbStations = stationTemplateUrl.numberOfStations ?? 0;
- for (let index = 1; index <= nbStations; index++) {
- await this.startChargingStation(index, stationTemplateUrl);
- }
- } catch (error) {
- console.error(
- chalk.red(
- `Error at starting charging station with template file ${stationTemplateUrl.file}: `
- ),
- error
- );
+ this.initializeCounters();
+ this.initializeWorkerImplementation();
+ await this.workerImplementation?.start();
+ await this.storage?.open();
+ this.uiServer?.start();
+ // Start ChargingStation object instance in worker thread
+ for (const stationTemplateUrl of Configuration.getStationTemplateUrls()) {
+ try {
+ const nbStations = stationTemplateUrl.numberOfStations ?? 0;
+ for (let index = 1; index <= nbStations; index++) {
+ await this.startChargingStation(index, stationTemplateUrl);