@coelmay this is exactly what Iβm looking for, but Iβm still running into issues with the ENOENT error. Iβm pretty sure itβs something silly, but Iβm new to this so Iβm at a bit of a loss for troubleshooting.
You completely rock!! That did the trick. Iβm curious about the css file being in the site rootβ¦ so eventually I need to have 3 functions (1 per template). My original plan was to structure it like this:
The templates directory is not accessible outside the function, so any files referenced in it (e.g. via <link href="">, or <img src="">) arenβt accessible once the function finished rendering and returns the content.
Your directory structure is a little overly complex. Simplify
You could have three separate functions and use static routing to specific paths to a function, or have a single function that determines which template to load based on the path.