phr3nzy / twig-challenge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Twig Challenge

A code challenge part of the interview process for TWIG Finance.

Description

The ./main.sh script will clone the three repositories (orders, payments and emails services) then build and run the docker containers.

You can access the services on the following ports:

  • Emails service: 3000
  • Payments service: 3001
  • Emails service: 3003

It will also run MongoDB and RabbitMQ containers on ports 27017 and 5672 respectively.

Swagger documentation for the services can be found on the following URLs:

or, you can use curl to test the services:

curl --request POST \
  --url http://localhost:3000/orders \
  --header 'Content-Type: application/json' \
  --data '{
  "email": "some_random_email@gmail.com",
  "amount": 10,
  "type": "shoes"
}'

There is also a delay on the payments and emails services to simulate a real world scenario.

Requirements

Usage

# Set the script as executable
$ chmod -x ./main.sh

# Run the script
$ ./main.sh

About


Languages

Language:Shell 100.0%