MCPcopy Index your code
hub / github.com/freshframework/fresh / launchDevServer

Function launchDevServer

packages/plugin-vite/tests/test_utils.ts:76–89  ·  view source on GitHub ↗
(
  dir: string,
  fn: (address: string, dir: string) => void | Promise<void>,
  env: Record<string, string> = {},
)

Source from the content-addressed store, hash-verified

74}
75
76export async function launchDevServer(
77 dir: string,
78 fn: (address: string, dir: string) => void | Promise<void>,
79 env: Record<string, string> = {},
80) {
81 await withChildProcessServer(
82 {
83 cwd: dir,
84 args: ["run", "-A", "--cached-only", "npm:vite", "--port", "0"],
85 env,
86 },
87 async (address) => await fn(address, dir),
88 );
89}
90
91export async function spawnDevServer(
92 dir: string,

Callers 2

dev_server_test.tsFile · 0.90
withDevServerFunction · 0.85

Calls 2

withChildProcessServerFunction · 0.90
fnFunction · 0.85

Tested by

no test coverage detected