flatend
flatend copied to clipboard
cmd/flatend, flathttp: handler for 404
Suggest to add 404 handler to be configuable under config.toml as follows
[[http.routes]]
code = "404"
service = "notFound"
In Node SDK:
const notFound = async ctx => {
const fs = require("fs");
fs.createFileStream("404.html").pipe(ctx);
}