Gateway

Build from source

Install Prerequisites

You will need an up-to-date version of Go to build your project. Please follow installation instructions provided here.

Cloning

cd /srv
git clone https://github.com/bsn-si/IPEHR-gateway.git

Configuration

cd IPEHR-gateway
cp config.json.example config.json

You can change the parameters inside the configuration file according to your needs.

To work, you will need a private account key in the blockchain, which will be used to send transactions. By default it is located in the file $HOME/.ipehr/.blockchain.key, but you can specify another path in the config in the contract.privKeyPath parameter.

mkdir -p ~/.ipehr
echo "<PRIVATE_KEY>" > ~/.ipehr/.blockchain.key
chmod 600 ~/.ipehr/.blockchain.key

In order for an account to be able to interact with contracts, it must be added by the contract administrator to the whitelist.

Building

cd /srv/IPEHR-gateway/src
go build -o ../bin/ipehr-gateway cmd/ipehrgw/main.go

Running

/srv/IPEHR-gateway/bin/ipehr-gateway -config=/srv/IPEHR-gateway/config.json

Docker

Last updated