Introduction

This tutorial will illustrate how you can build a REST API backed by PostgreSQL in Go, using Gorilla Mux for routing. The tutorial will employ test-driven development and will conclude by explaining how you can continuously test against a database during development.

Goals

By the end of this tutorial, you will:

  • Become familiar with Gorilla Mux, and
  • Learn how to test your application against a database with Continuous Integration (CI).

Prerequisites

This tutorial assumes:

  • Basic familiarity with Go and PostgreSQL, and
  • That you have working Go and PostgreSQL installations.

Introduction to the Application

Before we dive into the details, let’s take a brief look at the sample application we will be building as part of this tutorial.

What Will the Application Do?

The application will be a simple REST API server that will expose endpoints to allow accessing and manipulating ‘products’. The operations that our endpoint will allow…



UCSD DevOps CICD

Continue reading on source link