This is your SPA blueprint project. Ensure you have node installed on your path.
This project is composed of 2 parts:
- a SPA application under the folder:
*-clientapp/
- a Vert.x application
cd *-clientapp
npm install
For optimized (Production) builds:
npm run build
The output of the build will automatically be included in the final vert.x application.
mvn clean package
If you want to include the SPA application with your final build, run the previous build step as:
cd *-clientapp
npm install
npm run build
During development you can benefit from hot reload both on the SPA and on Vert.x:
VERTX_ENVIRONMENT=dev mvn compile vertx:run
In this case, the SPA utilities will launch the SPA dev server and redirect all traffic to the devserver.
The devserver will then proxy only the API calls to the vert.x application.
Changing the js source code will trigger the hot reload of the SPA framework.
Changing any maven related project will trigger a reload of the vert.x app.
For more information see vertx-maven-plugin.
Just use the plugin:
mvn clean package
This project was generated by the awesome online generator for Vert.x (https://vertx-starter.jetdrone.xyz/). As most developers I have encountered, I am a little bit lazy. Another way to create a Vert.x project is to use the starter from https://start.vertx.io/ but the former also includes a React app.