rethinkdb-example-nodejs icon indicating copy to clipboard operation
rethinkdb-example-nodejs copied to clipboard

Improve koa example

Open danneu opened this issue 9 years ago • 2 comments

I was passing through and noticed that the koa example was severely out of date, so I cleaned it up and made it much more koa-idiomatic.

Mainly,

  • Removed redundant try/catch error handlers since koa already lifts uncaught errors into 500 responses.
  • Flattened the boot procedure
  • Ensured that the RethinkDB connection always closes even if downstream handlers fail.

danneu avatar Jun 10 '16 22:06 danneu

Thanks for the PR @danneu !

@segphault or @deontologician is one of you available for reviewing this change?

danielmewes avatar Jun 10 '16 22:06 danielmewes

I will leave it to segphault, I haven't ever used koa myself

deontologician avatar Jun 10 '16 22:06 deontologician