Skip to content

Latest commit

 

History

History
118 lines (102 loc) · 3.08 KB

File metadata and controls

118 lines (102 loc) · 3.08 KB

Run the Example Locally

This section describes how to start the platform-deploy and web-auth-endpoint nodes and the Accounts and Template apps.

Note
The following procedures assume that you are continuing from Configure the Example.

Build and start the platform-deploy node

  1. Open a new terminal and run the following commands from the interbit repository’s root:

    npm i
    source secrets/platform-deploy.sh
    cd packages/platform-deploy
    npm run build:dev
    npm start

    Our package script runs a post-install step which builds all of the modules in the interbit repository. The build:dev step for platform-deploy creates a new manifest file using the newly-generated keys and hashed covenant files. The build step also updates the chain IDs for the other modules, including app-account and interbit-template.

    The start command spins up the platform-deploy node, which listens for incoming connections from the web-auth-endpoint node and the Account and Template apps' browser nodes.

    Important
    Leave this terminal open.
  2. Wait for platform-deploy to fully initialize.

    Once you see the following line, platform-deploy is fully initialized and you can move on to the next step:

    ROOT SAGA: watching for app-account-github-kyc/OAUTH_CALLBACK_SAGA

    Note

    As of mid-August 2018, the platform-deploy node can take 2-3 minutes to create the required blockchains, as it waits to see if any peers are already hosting the blockchains.

    + This is the only step where a delay is imposed.

Start the web-auth-endpoint node

  1. Open a new terminal (the second) and run the following commands from the interbit repository’s root:

    source secrets/web-auth-endpoint.sh
    cd packages/web-auth-endpoint
    npm start
    Important
    Leave this terminal open.

Start the Accounts and Template apps

  1. Open a new terminal (the third) and run the following commands from the interbit repository’s root:

    cd packages/app-account
    npm start
    Important
    Leave this terminal open.

    A new tab opens in your browser at http://localhost:3025, displaying the Accounts app:

    The Accounts app

    This React app starts an Interbit node to connect to the platform-deploy and web-auth-endpoint peer nodes running in the first two terminals.

  2. Open a new terminal (the fourth) and run the following commands from the interbit repository’s root:

    cd packages/interbit-template
    npm start
    Important
    Leave this terminal open.

    A new tab opens in your browser at http://localhost:3000, displaying the Template app.

    The Template app

    This React app starts an Interbit node to connect to the platform-deploy peer node.

Startup complete

Both nodes and both apps are now running. See the next section for the steps to create an account by authenticating with GitHub, and to authorize another app to connect to your account chain.