Setting Up Our Workspace: GitHub Repositories and Our First Endpoint

Dmytro Shamenko
3 min readJul 25, 2023

--

As we press forward on our journey in creating a Wishlist application, it’s crucial to establish the environment where our work will unfold. In the pursuit of greater focus and clarity, we’re dividing our next steps across two articles. Both these articles are intrinsically connected, yet individually cater to separate aspects of our setup phase.

In this first article, our primary objective is to create two repositories on GitHub and construct our foundational Golang application for our server. The subsequent piece will then take us deeper into more complex considerations.

Think of this as compartmentalising your project, akin to how you might approach your work tasks. Imagine utilizing a starter tool, GitLab Templates, Backstage, Yeoman, Cookiecutter, projen, or others, that enable you to swiftly spin up boilerplate projects. Such tools automate much of what we’re about to do manually here. However, it’s essential to note that the manual process we’re undertaking is intended as a learning experience for those less acquainted with these areas.

For those who are experienced, this process will be just as quick as reading this article, if not faster. So let’s get started, shall we?

GitHub and GitLab: Your Remote Repositories

GitHub and GitLab are two popular platforms widely used in organizations as remote repositories and developer platforms. They both offer the option to build workflows for applications, known as Continuous Integration and Continuous Deployment (CI/CD). But we’ll discuss CI/CD more in future articles. For now, we’re interested in using these platforms for their primary function — hosting our code.

To get started, create two repositories:

1. wishlist: This repository will contain all the code for our user interface.
2. wishlist-server: This repository will house the server logic.

Alternatively, you can create a single repository and keep the logic for both components in two different folders within that repository. There is no right or wrong way here — it depends on your preference and the complexity of your project.

The Power of Git

Git is a powerful tool for version control — a system that records changes to a file or set of files over time so that you can recall specific versions later. However, I won’t go into the details of what git is and how it works in this article. The internet is brimming with resources, courses, and videos that can explain git far better than I could in this brief piece. I recommend Codecademy’s course on git for beginners, which you can find here.

Creating Our First Golang Application: The Health Check Endpoint

Now that we’ve set up our repositories, let’s proceed with creating a simple Golang application for our wishlist-server. Our goal is to deliver the first endpoint called a ‘health check’.

But before that, let’s understand: What is an endpoint?

An endpoint in web development refers to a URL where our API can be accessed by a client application. In simpler terms, it’s one end of a communication channel between different software systems. In our case, it will be a URL that our web application (the client) will call to receive or send data to our server.

The health check endpoint is a simple API endpoint that returns a confirmation that our application is running and healthy. It’s typically used for monitoring and troubleshooting. This seemingly straightforward endpoint is, in fact, quite powerful and forms an essential part of any web application.

So, let’s build this health check endpoint and take another step towards creating our Wishlist application!

In our next article, we’ll delve into the specifics of creating the health check endpoint and discuss more on interacting with APIs. Stay tuned!

--

--

Dmytro Shamenko

Software Engineer with more than ten years of experience. Systems Architect expertise. DevOps methodology & Golang fan. www.linkedin.com/in/dmitriyshamenko