Skip to content

Examples

Sergey Shpak edited this page Mar 21, 2018 · 6 revisions

Examples list

Running examples

Here you can find the instructions on how to run the examples on different platforms.

Running examples on Linux

You need to take the following steps to run examples on your Linux machine:

  1. Make sure you have git, Node.js and npm installed;

  2. Create a new directory for DataPeps examples, change to it and run the following command to fetch examples code:

wget https://gist.githubusercontent.com/SergeyShpak/0310f86effc65370f0301ea3a61de927/raw/ba8d60a51b724f80ca5ab355720e861df9b433fa/getting-examples.sh && chmod +x ./getting-examples.sh && ./getting-examples.sh
  1. If not done yet export the DataPeps IP address environment variable:
export PEPSCRYPTO_HOST=<datapeps-ip>

Each examples are run with:

node <example-name>

Exact commands to run the examples are given in the examples' sections.

Running examples in a correct order

All examples use the identities that should be registered with DataPeps. To achieve that run:

npm run example-registration

in the examples directory before running other examples.