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.
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 |
$ git clone git@github.com:ega4432/go-rest-api-docker.git && cd go-rest-api-docker
$ cp .env.example .env
$ docker compose up --build
$ docker compose exec -it db /bin/bash -c "mysql -uroot -p<PASSWORD>"