Setting up Project

Clone Repo

https://github.com/0chain/zus-example-webapp

Prerequisites

Yarn Package Manager

Linux

Run the following commands :

sudo apt update
sudo apt install curl
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt install yarn -y

Mac

In Mac,yarn can be installed using the Homebrew package manager. To install Yarn on macOS, open a terminal and type:

brew install yarn 

Note: Make sure that Homebrew is installed properly using the command below

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 

Windows

Instructions can be found here

Start the sample app :

yarn dev

Sample Response ;

yarn dev
yarn run v1.22.19
warning ../package.json: No license field
$ next dev
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
event - compiled client and server successfully in 381 ms (166 modules)

Open http://localhost:3000 with your browser to see the result.

Sample Result

The response will be similat to screenshot below.

.

Last updated