Creating a Microservice in Go - Part 1
Description
You have a small collection of retro video games and you want to build a microservice API to manage them. In the spirit of microservices, you want to keeping the code base to one entity, game
s. This microservice will provide functionality to create, get, view, and delete a game
entity. Within this lab, you will implement the functionality to create and view these entities. It will also be RESTFUL (reading and writing JSON), and provide endpoints to return a collection of game
s.
Learning Objectives
Upon completion of this lab you will be able to:
- Understand Go code basics of creating a web server and connecting to a database
- Implement web server code and SQL code to create entities in a database
- Implement web server code and SQL code to retrieve entities from a database
Intended Audience
This lab is intended for:
- Developers, especially those working with Go
- Anyone leveraging containers
Prerequisites
You should possess:
- Basic understanding of the Go programming language
- Familiarity with basic SQL commands
- Understanding of the Linux command line
- Experience with JSON and CRUD APIs is recommended but not required
The following content is sufficient to fulfill these prerequisites:
- The Introduction to the Go Programming Language course
- The Learn SQL - From Newbie to Ninja learning path
- The Linux Command Line Byte Session learning path
Updates
October 4th, 2021 - Made the command to rebuild and run the api server explicit in the Retrieving Data From the Database lab step
August 15th, 2021 - Increased lab duration
May 26th, 2021 - Added instructions to include imports in the handler.go
file as needed when they are not automatically added