()
| 1726 | } |
| 1727 | |
| 1728 | async function isMainModule(): Promise<boolean> { |
| 1729 | if (!process.argv[1]) return false; |
| 1730 | |
| 1731 | const modulePath = await realpath(fileURLToPath(import.meta.url)); |
| 1732 | const entrypointPath = await realpath(process.argv[1]); |
| 1733 | return modulePath === entrypointPath; |
| 1734 | } |
| 1735 | |
| 1736 | if (await isMainModule()) { |
| 1737 | const { app, config, close } = createServer(); |