MCPcopy Create free account
hub / github.com/langgenius/dify / resolveDevProxyServerOptions

Function resolveDevProxyServerOptions

packages/dev-proxy/src/config.ts:80–90  ·  view source on GitHub ↗
(
  serverConfig: DevProxyServerConfig = {},
  cliOptions: DevProxyCliOptions = {},
)

Source from the content-addressed store, hash-verified

78}
79
80export const resolveDevProxyServerOptions = (
81 serverConfig: DevProxyServerConfig = {},
82 cliOptions: DevProxyCliOptions = {},
83): ResolvedDevProxyServerOptions => {
84 const configuredPort = cliOptions.port ?? serverConfig.port ?? DEFAULT_PROXY_PORT
85
86 return {
87 host: cliOptions.host || serverConfig.host || DEFAULT_PROXY_HOST,
88 port: resolvePort(configuredPort),
89 }
90}
91
92const isRecord = (value: unknown): value is Record<string, unknown> =>
93 typeof value === 'object' && value !== null

Callers 3

config.spec.tsFile · 0.90
startDevProxyServerFunction · 0.90
reloadFunction · 0.90

Calls 1

resolvePortFunction · 0.85

Tested by

no test coverage detected