(filePath)
| 61 | }; |
| 62 | |
| 63 | const readFileIfExists = async (filePath) => { |
| 64 | try { |
| 65 | const stat = await fs.stat(filePath); |
| 66 | if (!stat.isFile()) return null; |
| 67 | return await fs.readFile(filePath); |
| 68 | } catch { |
| 69 | return null; |
| 70 | } |
| 71 | }; |
| 72 | |
| 73 | const createStaticServer = async () => { |
| 74 | const server = http.createServer(async (req, res) => { |
no outgoing calls
no test coverage detected