Skip to content

psbrandt/openhim-core-js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Dependency Status

OpenHIM Core Component

The OpenHIM core component is responsible for providing a single entry-point into an HIE as well as providing the following key features:

  • Point of service application authentication and authorization
  • Persistence and audit logging of all messages that flow through the OpenHIM
  • Routing of messages to the correct service provider (be it an HIM orchestrator for further orchestration or the actual intended service provider)

⚠️ The OpenHIM core is currently in early active development and is not yet ready for production use.

Quickstart Guide

  1. Install Node.js 0.11.9 or greater
  2. Clone the https://github.com/jembi/openhim-core-js.git repository or download the code to the desired location
  3. Install and start MongoDB
  4. Install the dependencies by running npm install
  5. Start the server by running node --harmony lib/server.js

Installation and Development

Clone the https://github.com/jembi/openhim-core-js.git repository or download the code.

Prerequisites

The OpenHIM core makes use of the Koa framework, which requires node version 0.11.9 or greater. Node also has to be run with the --harmony flag for this allocation to work.

The easiest way to use the latest version of node is to install nvm. On Ubuntu, you can install using the install script but you have to add [[ -s $HOME/.nvm/nvm.sh ]] && . $HOME/.nvm/nvm.sh # This loads NVM to the end of your ~/.bashrc file as well.

Once nvm is installed, run the following:

nvm install 0.11

nvm alias default 0.11

The latest version of node 0.11 should now be installed and set as default. The next step is to get all the required dependencies using npm. Navigate to the directory where the openhim-core-js source is located and run the following:

npm install

In order to run the OpenHIM core server, MongoDB must be installed and running.

Installing MongoDB

Skip this section if you have already installed MongoDB

For further information see the MongoDB installation documentation.

Starting MongoDB

For more information see the MongoDB getting started guide.

Testing

This step is optional but recommended to ensure that the system is running as expected. To run the tests see the Testing section below.

Running the server

Once all the prerequisites have been installed, configured and started, run the OpenHIM core server by executing the following:

node --harmony lib/server.js

Testing

This project uses mocha as a unit testing framework with should.js for assertions and sinon.js for spies and mocks. The tests can be run using either npm or cake.

To run the tests using npm execute npm test.

When running the tests using cake you will need CoffeeScript. Install CoffeeScript by executing the following:

npm install -g coffee-script (omit the -g if you don't wish to install globally)

See the CoffeScript website for more further information.

With a valid install of CoffeeScript, run the tests by executing the following:

cake test

You can have the CoffeeScript files in src/ auto compile as you save them by running:

cake watch

Design

To see some design docs refer to the OpenHIE wiki pages:

About

The open health information mediator core component

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CoffeeScript 100.0%