(filePath, extraOptions)
| 81 | }; |
| 82 | |
| 83 | export const renderFile = async (filePath, extraOptions) => { |
| 84 | try { |
| 85 | const content = await readFile(filePath); |
| 86 | return render(content.toString(), extraOptions); |
| 87 | } catch (e) { |
| 88 | return render('File not found.', extraOptions); |
| 89 | } |
| 90 | }; |
| 91 | |
| 92 | export default async (req, res) => { |
| 93 | const dir = await getInitialDir(); |
no test coverage detected