Getting started with Gitpod

Luiz Gustavo De O. Costa
4 min readAug 22, 2021

--

Ready to not use your local environment? This is the idea behind the GitPod “Spin up fresh, automated dev environments, for each task, in the cloud, in seconds.

Pixabay

1. Why?

Don’t use your laptop/computer to code, instead use a browser to do it. Be Java, React, JavaScript etc.

2. Pricing

You can play into a free tier as I’m doing, that means 50 hours monthly.

3. How?

Click on the Try Now button if you’re a new user and the arrow indicates.

Home page — Gitpod

Select one of those Git repos, in my case I’ll pick GitHub.

Select Gitpod repos

And the then click at the button Continue with GitHub

Once you’ve sign in you’ll see your GitHub image on the top right

Gitpod — logged user

4. Configuration

If you want to push to the repository beyond only running into your browser, an additional step is required, follow the screens to achieve this.

Go to the integrations page https://gitpod.io/integrations and click into the Integrations label and then into your Git service.

Gitpod — Integrations page

Check the option public_repo and then hit the button Update Permissions, voilà.

Gitpod — Repo permission

5. Hands on

This section will be splitted in 2 sections. Doesn’t matter if your project is built over Java or React, both types of projects are allowed to run using Gitpod.

5.1. Running a Quarkus application

After has your account linked to the Gitpod, any project you want to open through this interface, use the following pattern

https://gitpod.io/#/https://github.com/<GitHub user>/<project name>

Example

https://gitpod.io/#/https://github.com/luizgustavocosta/16-bits-quarkus

The address above should be open using a browser.

Gitpod starting to open your project

I had to change the browser, since Safari at this moment is not supported 😢 but Google Chrome is.

Below is possible to have the project URL, files, and the most important the console to build and run any module.

Running the module profile. To do this, just type the commands below into the console

cd profile
mvn quarkus:dev

Since it is a clean slate environment, all the dependencies will be downloaded for your project to be built, hang on tight.

After the application starts, some ports will be available, to open and interact with the application in this case, follow the indicators.

Quarkus application up and running

Another point to remember. Quarkus works as a charm for the dev environment, then, let’s change the console message and access again the same endpoint of the picture below.

The expected outcome of the change will be:

1 — Console message changed

2 — File marked as modified

3 — Changes to push to the branch, in my case main branch #bad practice

4 — See the changes in GitHub repo

GitPod changes
GitHub change

6. Code

There are 2 projects configured in my GitHub (NextJS and Spring), and another one used in this article:

7. References

--

--

Luiz Gustavo De O. Costa
Luiz Gustavo De O. Costa

Written by Luiz Gustavo De O. Costa

Hey friend!! I’m Luiz Gustavo, a Java developer and I’m here to learn and write about Java, tests and good practices

No responses yet