This application will help you to create interoperability between two systems like Human Resource Management System (HRIS) and DHIS2 (District Health Information System version 2). For integrating two systems, you need to setup api access authentications for source and destination application in this middleware app. It can generate JSON payload for DHIS2 facility information management. All the sub modules are: # DHIS2 Facility Management, # DHIS2 User Information Management, # DHIS2 Dataset assignment
Make sure you have at least the following versions of node
and npm
.
- Node version v5.6.0 or higher
- npm version 3.8.0 or higher
Use the following commands to check your current versions
node -v
npm -v
Clone the repository from github with the following command
git clone https://github.com/Julhas08/dhis2-middleware-apps.git
Install the node dependencies
npm install
To set up your DHIS2 instance to work with the development service you will need to add the development servers address to the CORS whitelist. You can do this within the DHIS2 Settings app under the access tab. On the access tab add http://localhost:8081
to the CORS Whitelist.
The starter app will look for a DHIS 2 development instance configuration in
$DHIS2_HOME/config
. So for example if yourDHIS2_HOME
environment variable is set to~/.dhis2
, the starter app will look for~/.dhis2/config.js
and then~/.dhis2/config.json
and load the first one it can find.The config should export an object with the properties
baseUrl
andauthorization
, where authorization is the base64 encoding of your username and password. You can obtain this value by opening the console in your browser and typingbtoa('user:pass')
.If no config is found, the default
baseUrl
ishttp://localhost:8080/dhis
and the default username and password isadmin
anddistrict
, respectively.See
webpack.config.js
for details.
This should enable you to run the following node commands:
To run the development server
npm start
To run the tests one time
npm test
To run the tests continuously on file changes (for your BDD workflow)
npm run test-watch
To generate a coverage report for the tests
npm run coverage
To check the code style for both the JS and SCSS files run
npm run lint
Node JS, Express JS, PUG Engine, AJAX, Log4JS, CSS3 and HTML 5.
Npm is used as both a dependency management tool as a workflow manager through its scripts
as can be seen in the [package.json]. It provides convenience commands to kick off various tasks. These tasks are mentioned above as npm run <command>
, npm start
, npm test
, etc.