Skip to content

ega4432/go-rest-api-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-rest-api-docker

ci

Overview

This repository is a template for a Todo application in the Golang that can run on any platform as long as Docker is running.

MySQL is used as the data store.

Endpoints

Method Path Description
GET /tasks Get all tasks
POST /tasks Create a new task
GET /tasks/{id} Get a task
PUT /tasks/{id} Update a task
DELETE /tasks/{id} Delete a task

Usage

$ git clone git@github.com:ega4432/go-rest-api-docker.git && cd go-rest-api-docker

$ cp .env.example .env

$ docker compose up --build

Tips

Connect db container

$ docker compose exec -it db /bin/bash -c "mysql -uroot -p<PASSWORD>"

Import API test file with Thunder client

  1. Install extension from here
  2. Import JSON file