25% off

Use code FUNCMAIN at checkout for 25% off all premium courses.

Get started →

Go REST API - Project Setup

February 6, 2021
Elliot Forbes

Elliot Forbes

Course Instructor

Hey Gophers! My name is Elliot and I'm the creator of TutorialEdge and I've been working with Go systems for roughly 5 years now.

We’ll start off by creating a simple Go application that will act as the main entrypoint for our REST API.

We’ll also be wanting to initialize our project using the github cli as well:

$ gh repo create TutorialEdge/production-ready-api

This will provide a series of options that you can choose from. We’ll be wanting to create a public repository and you’ll want to change TutorialEdge to your own github project.

Now that we have our project’s directory setup and it configured with git, let’s dive in to initializing our project using go modules:

$ go mod init github.com/tutorialedge/production-ready-api

This will generate a go.mod file for our project.