Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernize the vert.x template #264

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pmlopes
Copy link

@pmlopes pmlopes commented Jul 29, 2021

Signed-off-by: Paulo Lopes [email protected]

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:

  1. 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.
  2. 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.
  3. On error the process now terminates. While before it would just print out the exception and keep the event loop running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant