X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcharging-station%2FBootstrap.ts;h=9fc759ff69c41bec24926dec35754249e762fb24;hb=852a4c5f07886502e278d44fda06efdfa8c711d8;hp=80e14d151bef4897d4f4ec541e967529572d2003;hpb=e4cb2c14d14e95090cca15518594af1c3f369d2b;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/Bootstrap.ts b/src/charging-station/Bootstrap.ts index 80e14d15..9fc759ff 100644 --- a/src/charging-station/Bootstrap.ts +++ b/src/charging-station/Bootstrap.ts @@ -19,7 +19,6 @@ import { } from '../types/ChargingStationWorker'; import { StationTemplateUrl } from '../types/ConfigurationData'; import Statistics from '../types/Statistics'; -import { ApplicationProtocol } from '../types/UIProtocol'; import Configuration from '../utils/Configuration'; import logger from '../utils/Logger'; import Utils from '../utils/Utils'; @@ -35,7 +34,7 @@ const moduleName = 'Bootstrap'; const missingChargingStationsConfigurationExitCode = 1; const noChargingStationTemplatesExitCode = 2; -export default class Bootstrap { +export class Bootstrap { private static instance: Bootstrap | null = null; private workerImplementation: WorkerAbstract | null = null; private readonly uiServer!: AbstractUIServer; @@ -56,7 +55,7 @@ export default class Bootstrap { ); this.initialize(); Configuration.getUIServer().enabled && - (this.uiServer = UIServerFactory.getUIServerImplementation(ApplicationProtocol.WS, { + (this.uiServer = UIServerFactory.getUIServerImplementation(Configuration.getUIServer().type, { ...Configuration.getUIServer().options, handleProtocols: UIServiceUtils.handleProtocols, }));