static int resolvePort(int? port, {APIConfig? apiConfig}) { port ??= apiConfig?.getPath('server', 'port'); return port != null && port > 10 ? port : 80; }