This API makes it easy to query one of the OEHU bigchaindb nodes.
The API is part of the OEHU bigger project. Read about the bigger picture over here.
Install dependencies:
npm installNow copy ./src/config.example.json to ./config.json & fill in the right mongo connection credentials:
cp ./src/config.example.json ./src/config.jsonMake sure you have a connection to the mongo database. You might have to create a SSL tunnel:
ssh root@IP_OF_BIGCHAINDB_NODE -L 27018:localhost:27017Now run the development environment:
npm run devThe API server will listen on http://localhost:8000 & watch for changes to restart.
npm startThe tests are made with AVA, nyc and mono-test-utils in test/:
npm testCreate this cron on the server to automatically start a SSH tunnel to a bigchaindb node:
crontab -e
* * * * * nc -z localhost 27018 || ssh -N -L 27018:localhost:27017 root@188.166.15.225 &
If you want to manually start the application using pm2, do the following:
pm2 start npm -- start