A Golang REST API project which doesn't use any http framework, router or mux that interacts with its own minimal in-memory database implementation and mongo database as a week-end experiment.
You can check details and test it from Swagger
Also you can access deployed API from here
- This project contains unit and integration tests which can be run with the following command.
go test ./... -run="^Test"
- Swagger documentation generated by using Swag. It can be re-generated after changes with the following command.
swag init --output ./app/docs
- This projects uses Mockery for mock generation. It can be re-generated when required with the following command.
mockery --case underscore --all --disable-version-string --output app/mocks
You can easily run this application on your local with building a binary image and providing MONGO_URI
environment variable while running this image.
Also, you can use Dockerfile to build a docker image and run.
go build
export MONGO_URI=mongodb+srv://user:pass@host/database
./go-pure-api