# Quickstart

Start by cloning coin-app-template

git clone https://gitlab.com/shardus/applications/coin-app-template.git
cd coin-app-template
npm install
# OR: yarn install

# Iterate on a single node

Make code changes to index.js and / or client.js.

Start the seed-node-server, monitor-server, and your index.js server:

npm start
# OR: yarn start

Interact with your index.js server:

node client.js
client$ help

  Commands:

    help [command...]                     Provides help for a given command.
    exit                                  Exits application.
    use <host>                            Uses the given <host> as the coin-app node for queries and transactions.
    wallet create <name> [id]             Creates a wallet with the given <name> and [id]. Makes [id] = hash(<name>) if [id] is not given.
    wallet list [name]                    Lists wallet for the given [name]. Otherwise, lists all wallets.
    tokens create <amount> <to>           Creates <amount> tokens for the <to> wallet.
    tokens transfer <amount> <from> <to>  Transfers <amount> tokens from the <from> wallet to the <to> wallet.
    query [account]                       Queries network data for the account associated with the given [wallet]. Otherwise, gets all network data.

Stop the seed-node-server and monitor-server, and clean residual run files:

npm run stop && npm run clean
# OR: yarn stop && yarn clean

Repeat until desired behavior is achieved...

# Test a network of nodes

Create a local test network with multiple instances of your index.js server:

TIP

Make sure you have the Shardus NPM package installed globally.

npm install -g shardus
# OR: yarn global add shardus
shardus create 3

Interact with your network:

node client.js

Stop the network:

shardus stop

Clean databases and logs from the last run:

shardus clean