Skip to content

erbalo/payment-platform-demo

Repository files navigation

How to run the project

  1. Start the docker compose
$> docker-compose up
  1. Start each line from scripts folder
$> docker run -p 8000:8000 -d amazon/dynamodb-local -jar DynamoDBLocal.jar -sharedDb -dbPath .

$> aws dynamodb create-table \
   --table-name transactions \
   --attribute-definitions AttributeName=id,AttributeType=S \
   --key-schema AttributeName=id,KeyType=HASH \
   --provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5 \
   --endpoint-url http://localhost:8000

# Just to verify
$> aws dynamodb list-tables --endpoint-url http://localhost:8000
  1. Intall dependencies
$> npm install
  1. Run the project
$> npm start
  1. Go to the rabbit UI http://localhost:15672 - User: guest and Password: guest

  2. Search the queue

  3. Publish the payload

{
  "command": "command-execution",
  "args": {
    "proxy": "PAYPAL",
    "order": {
      "id": 7891,
      "items": [
        {
          "id": 1287,
          "quantity": 5,
          "price": 12.5
        },
        {
          "id": 1281,
          "quantity": 2,
          "price": 15
        }
      ]
    }
  }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published