Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/flatend, flathttp: handler for 404 #6

Open
johnhorsema opened this issue Jun 25, 2020 · 0 comments
Open

cmd/flatend, flathttp: handler for 404 #6

johnhorsema opened this issue Jun 25, 2020 · 0 comments

Comments

@johnhorsema
Copy link
Contributor

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 johnhorsema changed the title cmd/flatend, flathttp: Handler for 404 / Catch-all handler Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant