flatend icon indicating copy to clipboard operation
flatend copied to clipboard

cmd/flatend, flathttp: handler for 404

Open johnhorsema opened this issue 5 years ago • 0 comments

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);
}

johnhorsema avatar Jun 25 '20 13:06 johnhorsema