This project is very similar to the maven-verticle project but instead of using a Java verticle is uses a JavaScript verticle.
You can run it directly in your IDE by creating a run configuration that uses the main class io.vertx.core.Launcher
and passes in the arguments run src/main/js/MyJavaScriptVerticle
.
The pom.xml uses the Maven shade plugin to assemble the application and all it’s dependencies into a single "fat" jar.
To build a "fat jar"
mvn package
To run the fat jar:
java -jar target/maven-verticle-javascript-3.4.2-fat.jar
(You can take that jar and run it anywhere there is a Java 8+ JDK. It contains all the dependencies it needs so you don’t need to install Vert.x on the target machine).
Now point your browser at http://localhost:8080
You can also launch the application from Maven directly:
-
to run it using the classes form target/classes:
mvn compile exec:java@run
-
to run the fat jar:
mvn package exec:exec@run-app