MCPcopy Create free account
hub / github.com/vercel/vercel / copyDevServer

Function copyDevServer

packages/go/src/index.ts:725–735  ·  view source on GitHub ↗
(
  functionName: string,
  dest: string
)

Source from the content-addressed store, hash-verified

723}
724
725async function copyDevServer(
726 functionName: string,
727 dest: string
728): Promise<void> {
729 const data = await readFile(join(__dirname, '../dev-server.go'), 'utf8');
730
731 // Populate the handler function name
732 const patched = data.replace('__HANDLER_FUNC_NAME', functionName);
733
734 await writeFile(join(dest, 'vercel-dev-server-main.go'), patched);
735}
736
737async function writeEntrypoint(
738 dest: string,

Callers 1

startDevServerFunction · 0.85

Calls 2

replaceMethod · 0.80
readFileFunction · 0.50

Tested by

no test coverage detected