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

Function startServer

test/integration/ondemand/test/index.test.ts:20–26  ·  view source on GitHub ↗
(optEnv = {}, opts?: any)

Source from the content-addressed store, hash-verified

18const appDir = join(__dirname, '../')
19
20const startServer = async (optEnv = {}, opts?: any) => {
21 const scriptPath = join(appDir, 'server.js')
22 appPort = await getPort()
23 const env = Object.assign({ ...process.env }, { PORT: `${appPort}` }, optEnv)
24
25 app = await initNextServerScript(scriptPath, /ready on/i, env)
26}
27
28// Tests are skipped in Turbopack because they are not relevant to Turbopack.
29;(process.env.IS_TURBOPACK_TEST ? describe.skip : describe)(

Callers 3

index.test.tsFile · 0.70
runTestsFunction · 0.50
runTestsFunction · 0.50

Calls 3

joinFunction · 0.90
initNextServerScriptFunction · 0.90
assignMethod · 0.80

Tested by

no test coverage detected