( functionName: string, dest: string )
| 723 | } |
| 724 | |
| 725 | async 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 | |
| 737 | async function writeEntrypoint( |
| 738 | dest: string, |
no test coverage detected