Casper Lottery Client is a Web application that allows users to play the lottery and see past plays. It is a React application bootstrapped from CSPR.click React template. To read more about CSPR.click, please check the documentation.
Before building and running the Web Client, please update the configuration. Start with copying the config template:
cp public/config.js.local public/config.js
Next, update the following configuration values:
- Change
lottery_app_contract_package_hash
if you deployed your own contract. If you want to use the demo application contract, keep the default value. - Change
cspr_click_app_id
to your CSPR.click App ID from CSPR.build Console
The rest of the values should remain the same for the local development, unless you made corresponding changes in other places.
To install the dependencies, run:
npm install
To build the project for production, run:
npm run build
This command will create a build folder with optimized production-ready files.
To run the application, execute:
npm start