Installation

Ready for Front & BackEnd systems (Node.js or React.js)

1) Installation

bepro-js is available as an npm package. You can install it easily with the following command if you want to use the code available via the bepro-js/master

// with npm
$ npm i git://github.com/bepronetwork/bepro-js.git#master

or via the Fork Directly (in case a developer is developing your issue and you want to test it in the meantime)

// with npm
$ npm i git://github.com/sgoia/bepro-js#master

Before trying to install, make sure your working directory has Python 2 and the recommended NVM version set - see optional below

2) Access the Object Functions directly via

If you are facing any issue in the development process please go to our Discord at #div-issues-support

Optional

Set up Python 2

// Install it via bash terminal globally
$ sudo apt install python2

// Check the installed version.
// Must shown Python 2.7.18rc1 on terminal to the install be OK
$ python2 --version

// Verify Python 2.7 path
$ ls /usr/bin/python*

// Set Python 2 as alternative 1
$ sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 1

// Confirm Python 2 as alternative priority 1
$ sudo update-alternatives --config python

// Confirm the procedure.
// Must shown Python 2.7.18rc1 on terminal to the install be OK
$ python --version

// On the working directory, run the cmd below to set Python locally
$ npm config set python python

Set up NVM

// Install NVM recommended version for bepro-js
$ nvm install 14.17.0

// Set it on the working directory
$ nvm alias default v14.17.0

// Use the settled as default
$ nvm use default

Your work directory is able to install and run bepro-js.

Docker Support

Requirements

  • Docker CE - 19.03.3+

  • Docker Compose - 1.19.0+

Install or upgrade docker and docker-compose?

Docker:

$ sudo curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh

Notice: If you already have Docker installed, this script can cause trouble if you installed the current Docker package using this script and are using it again to update Docker. You can also use the official installation instructions: Mac, Windows, Ubuntu, Other.

Docker Compose:

$ sudo curl -L "https://github.com/docker/compose/releases/download/1.25.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && sudo chmod +x /usr/local/bin/docker-compose

For Mac or Windows take a look at official guides.

Running containers

You can use docker-compose directly, or the nifty make that comes bundled.

// Build images
$ make build


// Starting containers in background
$ make up


// Start npm watch
$ make watch


// Run tests
$ make test


// Stop containers
$ make down


// Using docker-compose instead of make
$ docker-compose up

Last updated