amiGO (a·mi·go)
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.
General Usage
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.
API
For information regarding the listd API, visit https://amigoapi.docs.apiary.io/ to view documentation.
Dependencies
The only dependencies required to run the services in this repository are:
Make Rules
Testing
To test the go code in this repository execute the following command:
make test
This will build the containers in docker-compose.test.yml and run
GO111MODULE=on go test ./... against all testable go code in the
repository.
Running
To run the services execute the following command:
make run
This 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.
Stopping
To stop the services and save data execute the following command:
make stop
Special Thanks
George Shaw, Jim Rice, Jacob Walker