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
1
// with npm
2
$ npm i git://github.com/bepronetwork/bepro-js.git#master
Copied!
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

Optional

Set up Python 2

1
// Install it via bash terminal globally
2
$ sudo apt install python2
3
4
// Check the installed version.
5
// Must shown Python 2.7.18rc1 on terminal to the install be OK
6
$ python2 --version
7
8
// Verify Python 2.7 path
9
$ ls /usr/bin/python*
10
11
// Set Python 2 as alternative 1
12
$ sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 1
13
14
// Confirm Python 2 as alternative priority 1
15
$ sudo update-alternatives --config python
16
17
// Confirm the procedure.
18
// Must shown Python 2.7.18rc1 on terminal to the install be OK
19
$ python --version
20
21
// On the working directory, run the cmd below to set Python locally
22
$ npm config set python python
Copied!

Set up NVM

1
// Install NVM recommended version for bepro-js
2
$ nvm install 14.17.0
3
4
// Set it on the working directory
5
$ nvm alias default v14.17.0
6
7
// Use the settled as default
8
$ nvm use default
Copied!
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:
1
$ sudo curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh
Copied!
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:
1
$ 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
Copied!
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.
1
// Build images
2
$ make build
3
4
5
// Starting containers in background
6
$ make up
7
8
9
// Start npm watch
10
$ make watch
11
12
13
// Run tests
14
$ make test
15
16
17
// Stop containers
18
$ make down
19
20
21
// Using docker-compose instead of make
22
$ docker-compose up
Copied!
Last modified 1mo ago