Comment

Comment by DiggityDug7

> 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.

parent DiggityDug7 11 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton