()
| 14 | const distClientDir = path.resolve(distDir, 'client') |
| 15 | |
| 16 | function resolveDistServerEntryPath() { |
| 17 | const serverJsPath = path.resolve(distDir, 'server', 'server.js') |
| 18 | if (fs.existsSync(serverJsPath)) { |
| 19 | return serverJsPath |
| 20 | } |
| 21 | |
| 22 | const indexJsPath = path.resolve(distDir, 'server', 'index.js') |
| 23 | if (fs.existsSync(indexJsPath)) { |
| 24 | return indexJsPath |
| 25 | } |
| 26 | |
| 27 | return serverJsPath |
| 28 | } |
| 29 | |
| 30 | export async function createStartServer() { |
| 31 | const distServerEntryPath = resolveDistServerEntryPath() |
no test coverage detected