rethinkdb-example-nodejs
rethinkdb-example-nodejs copied to clipboard
Improve koa example
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.
Thanks for the PR @danneu !
@segphault or @deontologician is one of you available for reviewing this change?
I will leave it to segphault, I haven't ever used koa myself