nonGreenlockWorkerSetup = async (appargs, port, host) => {
  process.send && process.on("message", workerDispatchMsg);

  const app = await getApp(appargs);

  const cert = getState().getConfig("custom_ssl_certificate", "");
  const key = getState().getConfig("custom_ssl_private_key", "");
  const timeout = +getState().getConfig("timeout", 120);
  const pruneSessionInterval = +(await getState().getConfig(
    "prune_session_interval",
    900
  ));
  // Server with http on port 80 / https on 443
  // todo  resolve hardcode

  const listenArgs = { port };
  if (host) listenArgs.host = host;
  if (port === 80 && cert && key) {
    const https = require("https");
    const http = require("http");
    const httpServer = http.createServer(app);
    const httpsServer = https.createServer({ key, cert }, app);
    // todo timeout to config
    httpServer.setTimeout(timeout * 1000);
    httpsServer.setTimeout(timeout * 1000);
    setupSocket(
      appargs?.subdomainOffset,
      pruneSessionInterval,
      httpServer,
      httpsServer
    );
    httpServer.listen(listenArgs, () => {
      console.log("HTTP Server running on port 80");
    });

    // todo port to config
    const httpsListenArgs = { ...listenArgs, port: 443 };
    httpsServer.listen(httpsListenArgs, () => {
      console.log("HTTPS Server running on port 443");
    });
  } else {
    // server with http only
    const http = require("http");
    const httpServer = http.createServer(app);
    setupSocket(appargs?.subdomainOffset, pruneSessionInterval, httpServer);

    // todo timeout to config
    // todo refer in doc to httpserver doc
    // todo there can be added other parameters for httpserver
    httpServer.setTimeout(timeout * 1000);
    httpServer.listen(listenArgs, () => {
      console.log(
        `Saltcorn listening on http://${host || `localhost`}:${port}/`
      );
    });
  }
  getState().processSend("Start");
}
@param {*} appargs
@param {*} port
@returns {Promise<void>}