Skip to content

OEHU/oehu-api

Repository files navigation

veh-api

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.

Installation

Install dependencies:

npm install

Now copy ./src/config.example.json to ./config.json & fill in the right mongo connection credentials:

cp ./src/config.example.json ./src/config.json

Development

Make 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:27017

Now run the development environment:

npm run dev

The API server will listen on http://localhost:8000 & watch for changes to restart.

Production

npm start

Tests

The tests are made with AVA, nyc and mono-test-utils in test/:

npm test

Create 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors