mHERO Synchtonization Coordinator (IL adapter)
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

mHero Synchronisation Coordinator

It synchronises health worker information from Health Worker Registry to RapidPro.

How to setup

After 'git clone' the repository, do following in your working directory:

Prepare your environment:

  • (Make sure you have NodeJS installed)
  • npm install -g grunt-cli
  • npm install

Run test:

  • cp config/hero-auth-config.sample.json config/
  • (Edit config/ to fit your config. Please use "" for rapidpro.instance)
  • grunt

Pull and push data:

  • cp config/hero-auth-config.sample.json config/hero-auth-config.staging.json
  • (Edit config/hero-auth-config.staging.json to fit your config)
  • ./scripts/heracles.js (to pull data)
  • ./scripts/sisyphus.js (to push data)

Run as a service:

Run at staging server

  • (Get LiberiaHWR.pem from Carl and copy it to ~/.ssh/ folder.)
  • ssh -i ~/.ssh/LiberiaHWR.pem -l ubuntu
  • cd node/mhero-synch/
  • git pull
  • (Make sure config/hero-config.staging.json is what you want.)
  • forever restartall (Run the latest revision.)
  • lynx http://localhost:8082 (Trigger a pull-push activity.)
  • (Check ~/.forever/Wr-_.log for logs. Check run/push.log for errors happened when pushing contacts to RapidPro.)