MCPcopy
hub / github.com/vercel/next.js / launchApp

Function launchApp

test/lib/next-test-utils.ts:511–531  ·  view source on GitHub ↗
(
  dir: string,
  port: string | number,
  opts?: NextDevOptions
)

Source from the content-addressed store, hash-verified

509
510// Launch the app in development mode.
511export function launchApp(
512 dir: string,
513 port: string | number,
514 opts?: NextDevOptions
515) {
516 const options = opts ?? {}
517 const useTurbo = shouldUseTurbopack()
518
519 return runNextCommandDev(
520 [
521 useTurbo ? '--turbopack' : undefined,
522 dir,
523 '-p',
524 port as string,
525 '--hostname',
526 '::',
527 ].filter((flag: string | undefined): flag is string => Boolean(flag)),
528 undefined,
529 { ...options, turbo: useTurbo }
530 )
531}
532
533export function nextBuild(
534 dir: string,

Callers 15

index.test.tsFile · 0.90
index.test.tsFile · 0.90
index.test.tsFile · 0.90
index.test.tsFile · 0.90
index.test.tsFile · 0.90
index.test.tsFile · 0.90
gsp-gssp.test.tsFile · 0.90
index.test.tsFile · 0.90
runTestsFunction · 0.90
index.test.tsFile · 0.90
index.test.tsFile · 0.90
index.test.tsFile · 0.90

Calls 3

shouldUseTurbopackFunction · 0.90
runNextCommandDevFunction · 0.70
filterMethod · 0.45

Tested by 12

runTestsFunction · 0.72
getDataFunction · 0.72
devStartAndExportFunction · 0.72
runDevFunction · 0.72
runTestsFunction · 0.72
runAndCaptureOutputFunction · 0.72
checkMissingFunction · 0.72
collectStdoutFromDevFunction · 0.72
runTestsFunction · 0.72
getStderrFunction · 0.72
buildAndStartFunction · 0.72
runTestsFunction · 0.72