Switch branches/tags
Nothing to show
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmd added code Feb 20, 2018
docker added missing dep ensure to entrypoints Feb 26, 2018
pkg added code Feb 20, 2018
tests added some docs Feb 20, 2018
.env added code Feb 20, 2018
.gitignore added code Feb 20, 2018
Dockerfile added code Feb 20, 2018
Gopkg.lock added code Feb 20, 2018
Gopkg.toml added code Feb 20, 2018
Makefile added code Feb 20, 2018
README.md [README] added missing make for test commands Feb 27, 2018
docker-compose.yml added missing dep ensure to entrypoints Feb 26, 2018

README.md

Clean Monolith Shop

Source code for https://threedots.tech/post/microservices-or-monolith-its-detail/ article.

This shop can work both as monolith and microservices. More info you will find in the article.

This repository contains only REST API.

Prerequisites

You need Docker and docker-compose installed.

Everything is running in Docker container, so you don't need golang either any other lib.

Running

Just run

make up

It will build Docker image and run monolith and microservices version.

Services addresses

Monolith: http://localhost:8090/


Orders microservice: http://localhost:8070/

Shop microservice: http://localhost:8071/

Payments microservice: no public API (you can export ports in docker-compose.yml if you need)

For available methods, please check interfaces layer in source code and tests tests/acceptance_test.go.

Running tests

First of all you must run services

make up

Then you can run all tests by using in another terminal:

make docker-test

If you want to test only monolith version:

make docker-test-monolith

or microservices:

make docker-test-microservices