Skip to content

mojaloop/mono

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Monorepo for Mojaloop

Prerequisites

Setup

  1. Install rush

    npm install -g @microsoft/rush
  2. Clone the repository

    git clone https://github.com/mojaloop/mono.git
  3. Clone the submodules

    cd mono
    git submodule update --init
  4. Install the dependencies

    rush update
  5. Build

    The build is needed due to some TypeScript dependencies.

    rush build
  6. Create the containers

    cd hub
    docker compose up -d --wait
  7. Set up docker DNS resolution for host.docker.internal

    As this project was developed and tested inside a dev container, the host.docker.internal DNS resolution is used for communication with the backends running in docker. If you are running the project on the host machine, you need to set up the DNS resolution for host.docker.internal to point to the usual docker gateway IP address.

    sudo echo "172.17.0.1 host.docker.internal" | sudo tee -a /etc/hosts
  8. Create the MySQL schemas

    cd hub
    npm run migrate
  9. Create .env file in the repo root

    Due to some of submodules requirements, the .env file is needed.

    touch .env

Running and testing

There are two scripts in the repository root to help with running and testing the hub: hub.sh and watch.sh. The script watch.sh is useful for development, as it will restart the services when files change. The following commands are available:

  • ./hub.sh start --help - show the available options, which allow only part of the Mojaloop services to be started.
  • ./hub.sh start -dal - for example will start discovery, agreement and ledger services.
  • ./hub.sh start - without options will start all the Mojaloop services, simulators and the test toolkit
  • ./hub.sh test provision - provision for testing
  • ./hub.sh test gp - run the GP tests
  • ./hub.sh test settlement - run the settlement tests