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

Function startDevProxyServer

packages/dev-proxy/src/cli.ts:39–56  ·  view source on GitHub ↗
(config: DevProxyConfig, cliOptions: DevProxyCliOptions)

Source from the content-addressed store, hash-verified

37})
38
39const startDevProxyServer = (config: DevProxyConfig, cliOptions: DevProxyCliOptions) => {
40 let app = createDevProxyApp(config)
41 const { host, port } = resolveDevProxyServerOptions(config.server, cliOptions)
42 const server = serve({
43 fetch: (request, env) => app.fetch(request, env),
44 hostname: host,
45 port,
46 })
47
48 return {
49 host,
50 port,
51 server,
52 updateConfig(nextConfig: DevProxyConfig) {
53 app = createDevProxyApp(nextConfig)
54 },
55 }
56}
57
58const createDevProxyRuntime = (initialConfig: DevProxyConfig, cliOptions: DevProxyCliOptions) => {
59 let runtime = startDevProxyServer(initialConfig, cliOptions)

Callers 2

createDevProxyRuntimeFunction · 0.85
reloadFunction · 0.85

Calls 3

createDevProxyAppFunction · 0.90
fetchMethod · 0.45

Tested by

no test coverage detected