A generalized unit tested Golang RESTful API micro-service template. The application makes RESTful calls to manage a list with items. Use this template to help accelerate your next golang project.
This repository runs a simple list daemon (listd) that implements a API for lists and items in relation to lists.
The daemon uses a PostgreSQL database to persist data.
For information regarding the listd API, visit https://amigoapi.docs.apiary.io/ to view documentation.
The only dependencies required to run the services in this repository are:
dockerdocker-compose
To test the go code in this repository execute the following command:
make testThis will build the containers in docker-compose.test.yml and run
GO111MODULE=on go test ./... against all testable go code in the
repository.
To run the services execute the following command:
make runThis will stop any containers defined by the compose file if already running
and then rebuild the containers using the compose file. The list daemon (listd)
will be available at localhost:3000 and the postgres instance will be available
at localhost:5432.
To stop the services and save data execute the following command:
make stopGeorge Shaw, Jim Rice, Jacob Walker