Skip to content

Configuration

Below are emNutt configuration parameters

App Config

"app": {
  "port": 3002,
  "installed": false,
  "baseURL": "http://localhost:3002/emNutt",
  "contactGroupsSource": "pos",
  "phoneCountryCode": "+255"
}
  • app.port - is the port number for emNutt
  • app.installed - when false, emNutt will load all default settings and set app.installed to true. If you want to reload default settings then set this to false at any time.
  • app.baseURL - is the base URL that is used to access the emNutt server, if emNutt is behind any proxy, then it should be the address used to access emNutt through proxy
  • app.contactGroupsSource - tells emNutt the system that is used to manage contacts groups, values can either be pos or the name of the communication channel like rapidpro. If the value is pos then contact groups will be managed by Point of Service system like iHRIS, openMRS, DHIS2 etc, other wise then contacts groups will be managed through communications channel i.e rapidpro
  • app.phoneCountryCode - tells the app the country code to be used. The app will use this to modify all contacts that doesnt have country code. leave this blank not to modify contacts.

Mediator Config

"mediator": {
  "api": {
    "username": "root@openhim.org",
    "password": "openhim-password",
    "apiURL": "https://localhost:8080",
    "routerURL": "http://localhost:5001",
    "trustSelfSigned": true,
    "urn": ""
  }
  "register": false
}
  • mediator.api.username is the openHIM username for emNutt to register itself as a openHIM mediator
  • mediator.api.password is the openHIM password
  • mediator.api.apiURL is the openHIM API URL
  • mediator.api.routerURL is the openHIM URL used to send to access mediator channels,default port is 5001 for http and 5000 for https
  • mediator.register controls on whether emNutt should be used as a openHIM mediator or not, if set to false then emNutt will be used as a stand alone app.

Rapidpro Config

"rapidpro": {
  "baseURL": "http://app.rapidpro.io",
  "token": "1c443695d3bdhgeaf3e89b52dyg56e2886fa8uh2",
  "syncAllContacts": false
}
  • rapidpro.baseURL is the rapidpro base URL that is used by emNutt for starting workflows, sync contacts etc
  • rapidpro.token is the security token that can be obtained from inside rapidpro
  • rapidpro.syncAllContacts - if set to true then emNutt will sync all contacts from iHRIS or DHIS2 etc and save them to Rapidpro. If set to false then only contacted contacts will be saved into Rapidpro.

FHIR Server Config

"macm": {
  "baseURL": "http://localhost:8080/fhir",
  "username": "",
  "password": ""
}
  • macm.baseURL - This is the base URL for the FHIR server
  • macm.username - This is the username for the FHIR server
  • macm.password - This is the password for the FHIR server

Elasticsearch Config

"elastic": {
  "baseURL": "http://localhost:9200",
  "username": "",
  "password": ""
  "max_compilations_rate": "10000/1m"
}
  • elastic.baseURL - Is the base URL of Elasticsearch server
  • elastic.username - Is the elasticsearch username
  • elastic.password - Is the elasticsearch password
  • elastic.max_compilations_rate - this sets maximum scripts (requests) per minute that ES can execute, default is 15/minute which doesnt work well with emNutt

Kibana Config

"kibana": {
  "baseURL": "http://localhost:5601",
  "username": "",
  "password": ""
}
  • kibana.baseURL - Is the base URL for Kibana
  • kibana.username - Is the kibana username
  • kibana.password - Is the kibana password

Start server

npm start

Last update: September 28, 2022