Skip to content

Programmatically start HTTP server from command line application #43925

Answered by cescoffier
libe asked this question in Q&A
Discussion options

You must be logged in to vote

You can create your own HTTP server using the Vert.x API directly.

Here is an example:

  1. Add the quarkus-vertx extension
  2. Write something like:
@Inject Vertx vertx;
// ...
var server = vertx.createHttpServer();
server
      .requestHandler(req -> req.response().end("Hello verticle 2"))
      .listen(8080);

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@libe
Comment options

Answer selected by libe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants