@kb-labs/rest-api-app 2.116.14 → 2.118.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -6635,7 +6635,8 @@ async function startRestApi({
6635
6635
  await metricsCollector2.start(1e4, 6e4);
6636
6636
  const restTransport = platform16.getAdapter("serviceTransport");
6637
6637
  const restAddr = restTransport?.listenAddress?.("rest");
6638
- const listenPort = restAddr && "port" in restAddr ? restAddr.port : config.port;
6638
+ const netOffset = Number(process.env.KB_NET_OFFSET) || 0;
6639
+ const listenPort = restAddr && "port" in restAddr ? restAddr.port : config.port + netOffset;
6639
6640
  const restAddrHost = restAddr && "host" in restAddr ? restAddr.host : void 0;
6640
6641
  const restHost = process.env.REST_API_HOST ?? restAddrHost ?? "0.0.0.0";
6641
6642
  const address = await server.listen(getListenOptions(listenPort, restHost));