Installation

1. Install Node.js

The download link is: https://nodejs.org/en/download/.

2. Clone or Download Dewblock from GitHub

The GitHub project page is: https://github.com/yingweiwang/dewblock.

Click the Green button “Clone or Download”. If you are a GitHub user, you may use “Open in Desktop”, otherwise, you may Download ZIP file and unzip it.

3. Deploy Dewblock

Dewblock has two components: Dewblock-cloud-server package and Dewblock-dew-server package. Ideally, Dewblock-cloud-server package should be deployed in a cloud service or a computer that is running all the time and has a fixed IP address so that it can be accessed easily; Dewblock-dew-server package can be deployed in a local computer, such as a desktop/laptop computer or a mobile device. Dewblock-cloud-server package and Dewblock-dew-server package could be stay in the same computer for testing.

If you want to test two or more Dewblock nodes, multiple computers must be used. Different nodes cannot be deployed into the same computer because each node needs to have its unique IP address.

For one node Dewblock testing, these two packages may stay in the same folder as you have just cloned or unzipped.

4. Dewblock Node Configuraton

Here we describe one node configuration. Multiple nodes configuration will be described later.

Configuration files are already preset for one node one machine testing.

Configuraton files:
Dewblock-dew-server/src/config.ts

let mode: string = ‘dew’;

let cloudAddress = ‘127.0.0.1:7001’;

Dewblock-cloud-server/src/config.ts

let dewAddress = ‘127.0.0.1:6001’;

Detailed configuration guidelines can be found in these files.

Please notice: If more than one machine is involved, config files should use actual IP addresses, not use localhost or 127.0.0.1 at all.

5. Installation cloud server

Start a command prompt window.

Change directory to the dew server package

cd … \dewblock\Dewblock-cloud-server

Installation command:

npm install

6. Start the cloud server

npm start

7. Installation dew server

Start a command prompt window.

Change directory to the dew server package

cd … \dewblock\Dewblock-cloud-server

Installation command:

npm install

8. Start the dew server

npm start