Start a Vert-x project in less than 5 minutes with GitPod and GitLab
Yesterday, I did a pleasing
You can watch the replay here https://youtu.be/5Rtq5O3U0ZU
So, this morning, I wrote a new "issue/blog" post to explain how to do a similar setup but with a Java Vert-x web project.
Create a new GitLab project
First, you need to create a new GitLab project, with a README.md
file
And click on the green button Create project
Launch a GitPod workspace
Once the project is created, click on the blue button GitPod
Then wait for some seconds, GitPod will create a workspace from your project
And a moment later
Create a Vert-x project
Copy-paste the above command inside the terminal panel of GitPos to download a Vert-x project starter kit:
curl -G https://start.vertx.io/starter.zip \
-d "groupId=garden.bots.hello" \
-d "artifactId=starter" \
-d "vertxVersion=4.0.0-SNAPSHOT" \
-d "vertxDependencies=vertx-web" \
-d "language=java" \
-d "jdkVersion=11" \
-d "buildTool=maven" \
--output starter.zip
🖐 ️ you can define your own starter kit here: https://start.vertx.io/
The command will download a zip file: starter.zip
:
Then unzip starter.zip
, and delete it:
unzip starter.zip
rm starter.zip
And you even got the auto-completion feature thanks to the Java LSP (language server protocol) support (developed by RedHat):
Build and run the project
Now you can build and run your project with this command:
./mvnw clean compile exec:java
When the application is launched, GitPod detects that the application is listening on the 8888
HTTP port:
So, if you click on Open Preview, GitPod opens a browser panel and connects to your web application:
Commit and push
You can commit and push your code:
git add .
git commit -m "🎉"
git push
And check that your project is updated:
That's all
You can find the project sample here: https://gitlab.com/k33g_org/samples/vert-x-java-demo
👋
- If you loved this "post" (or not), don't forget to use the emojis reactions
- Don't hesitate to add comments and/or ask questions
- You can subscribe to the Rss feed