One way to slim down bloated Express controllers
If you've ever worked with Express code, you've likely had to read through controllers (also sometimes referred to as "route handlers") that are doing way too much.
So much so, that sometimes you can't even fit all the code for a method on the screen.
These types of controllers are referred to as "fat" / "bloated" controllers.
They're a problem because they're:
- difficult to reason about
- agonizing to write tests for
- typically harder to reuse code from