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

Function nextStart

test/lib/next-test-utils.ts:561–577  ·  view source on GitHub ↗
(
  dir: string,
  port: string | number,
  opts: NextDevOptions = {}
)

Source from the content-addressed store, hash-verified

559}
560
561export function nextStart(
562 dir: string,
563 port: string | number,
564 opts: NextDevOptions = {}
565) {
566 if (!opts.disableAutoSkewProtection && shouldUseTurbopack() && !opts.env) {
567 opts.env ??= {}
568 opts.env.NEXT_DEPLOYMENT_ID = 'test-dpl-id-1234'
569 opts.env.__NEXT_IMMUTABLE_ASSET_TOKEN = 'test-immutable-tkn-7890'
570 }
571
572 return runNextCommandDev(
573 ['start', '-p', port as string, '--hostname', '::', dir],
574 undefined,
575 { ...opts, nextStart: true }
576 )
577}
578
579export function buildTS(
580 args: 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
index.test.tsFile · 0.90
index.test.tsFile · 0.90
index.test.tsFile · 0.90
index.test.tsFile · 0.90

Calls 2

shouldUseTurbopackFunction · 0.90
runNextCommandDevFunction · 0.70

Tested by 3

getDataFunction · 0.72
devStartAndExportFunction · 0.72
buildAndStartFunction · 0.72