docs
docs copied to clipboard
Document PlaintextRenderer and viewsDirectory
I recently tried to render a .html file in a route in Vapor 4 and did not find any documentation on it except from on an stackoverflow answer. The community recommended to create an issue.
I got it working by using the PlainTextRenderer
app.get { req in
req.view.render("index.html")
}
and by adding the resourcesDirectory/viewsDirectory
{ProjectPath}/Resources/Views/index.html
I suggest documenting both the PlainTextRenderer and the resourcesDirectory / viewsDirectory.