Skip to content

re: Separating logic from Express routes for easier testing VIEW POST


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.

code of conduct - report abuse