The current vert.x template is using a no longer supported version of vert.x. This PR modernizes it and tries to address a few usability issues:
The current template will not be able to easily read request body as BodyHandler isn't mounted in the router. Instead of hardcoding a set of handlers (like the StaticHandler example). The PR exposes a setUp() method that users can use to mount all the helpers they see fit.
The function would listen on any HTTP verb. The PR allows the function class to optionally implement the interface Handler<RoutingContext>, when the function class implements it, then it behaves just like before, when it doesn't, the function assumes all control from the setUp() method.
On error the process now terminates. While before it would just print out the exception and keep the event loop running.
Signed-off-by: Paulo Lopes pmlopes@gmail.com
The current vert.x template is using a no longer supported version of vert.x. This PR modernizes it and tries to address a few usability issues:
BodyHandler
isn't mounted in the router. Instead of hardcoding a set of handlers (like theStaticHandler
example). The PR exposes asetUp()
method that users can use to mount all the helpers they see fit.Handler<RoutingContext>
, when the function class implements it, then it behaves just like before, when it doesn't, the function assumes all control from thesetUp()
method.