Skip to content

cmd/flatend, flathttp: handler for 404 #6

Description

@johnhorsema

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions