|
|
|
|
|
by pathsjs
3646 days ago
|
|
The problem with this approach is that it would be difficult to make handlers first-class. What if your post routes are a handler imported from another module? Templates would allow for the syntax you present, but do not combine. |
|
For example, the 'firstOf' template above would be responsible for scanning the AST it's given, taking each node and putting it in to a sequence. Then it instantiates a Handler with that sequence and returns it.