Hacker News new | ask | show | jobs
by DiggityDug7 4057 days ago
> Instead of taking the response as a second argument, the dispatch function is expected to return the response... The moment the function returns, both the status code and all headers are known.

I highly doubt this convention will work. You need to be able to return errors or DB information in the response code and headers, which would be impossible since Node is nonblocking. Even something as basic as storing session information in Redis suddenly becomes impossible. This seems like it gives a very minor benefit and causes a whole lot of problems.

1 comments

That's why quinn uses async/await