Make the station worker self contained.
[e-mobility-charging-stations-simulator.git] / src / charging-station / StationWorker.js
CommitLineData
7dde0b73
JB
1const {isMainThread, workerData} = require('worker_threads');
2const ChargingStation = require('./ChargingStation');
3
4if (!isMainThread) {
2e6f5966 5 const station = new ChargingStation(workerData.index, workerData.templateFile);
7dde0b73
JB
6 station.start();
7}