//inserting initialworker(coordinator), only if table stills empty and has not GOD-Worker. Otherwise it will try to create new worker by each server-run, which will result in having errors(e.g. duplicate primary key)
constcreateInitialWorkerIfNotExists=async ()=>{
//inserting initial-worker(coordinator), only if table stills empty and has no initial-Worker. Otherwise it will try to create new worker by each server-run, which will result in having errors(e.g. duplicate primary key)
consttableEmpty=awaitWorker.findAll();
if (tableEmpty.length===0){
//password as plain text
constplainTextPassword="coordinator_password";
//create hashed-password and store worker-data into DB