DEV Community

Discussion on: Separating logic from Express routes for easier testing

Collapse
 
jesseinit profile image
Jesse Egbosionu

Nice post. Your suggested way is how I write route handlers. I usually define them as a static method in a class, export the class and then finally call the static method on the class as my route callback.