Using command-line script

The following information explains the functions you can use from NodeChain, the command-line interface that connects to the Connector and enables you to interact with the blockchain nodes.

circle-exclamation

Running the connector

To start using NodeChain it is mandatory to start the connector. Just type:

$ python3 nodechain.py start

# or

$ ./nodechain.py start

An interface will open asking for the port and the SSL port on which you want to start the Connector.

$ ./nodechain.py start
---------------------------------------------------
  _  _          _        ___  _                   
 | \| | ___  __| | ___  / __|| |_   __ _ (_) _ _  
 | .` |/ _ \/ _` |/ -_)| (__ | ' \ / _` || || ' \ 
 |_|\_|\___/\__,_|\___| \___||_||_|\__,_||_||_||_|
---------------------------------------------------
===================================================
                CONNECTOR CONFIG
===================================================
Port to start: 60000
Port to start (SSL): 443
Starting network nodechain-network.
Starting connector and reverse proxy... This might take a while.
Connector has been started

Running the nodes

Once the Connector is started, you will be able to choose which nodes to start from the same interface.

With the Connector started, open the node interface simply typing:

Choosing Blockchain and Network

Follow the steps indicated in the menu to choose the blockchain and the network on which you want to start the node.

circle-info

The default blockchain data path is /srv/nodechain-node/<TOKEN_NETWORK>

Register the API

Once you have chosen the blockchain and network, you must choose whether to initiate local nodes or connect to a remote node:

circle-exclamation

Finally, choose whether you want to configure the configuration endpoints or load the default configuration.

circle-info

The default configuration is stored in the config.json file. This is used to automatically load the node configuration.

Stopping the Connector

To stop the connector all you need to do is running:

After that, an interface will appear asking if you want to stop the connector. If you accept to stop the Connector all running nodes will also stop.

circle-exclamation

Stopping the nodes

If a node is started and you want to stop it all you have to do is:

After refusing to stop the connector, follow the steps to stop any running node.

circle-info

Running nodes will be marked as [RUNNING] in the interface

Display services status

You can display the status of node services. To do this, run the following command:

Last updated