/ocap-react-starter

React Starter project with OCAP JS SDK integrated

Primary LanguageJavaScriptMIT LicenseMIT

ocap-react-starter

OCAP DApp starter template with @arcblock/ocap-js integrated, bootstrapped using create-react-app.

中文版文档请猛击 README.cn.md

Usage

1. Use as custom react-scripts

Make sure you have npm v6+ installed.

npx create-react-app my-ocap-app --scripts-version @arcblock/react-scripts
cd my-ocap-app
yarn start

2. Use as starter template

git clone https://github.com/ArcBlock/ocap-react-starter.git
cd ocap-react-starter
yarn
yarn serve

If you are from China, use a mirror npm registry maybe better: yarn --registry=https://registry.npm.taobao.org

OCAP SDK Usage Example

OCAP SDK Documentation

Other OCAP Tools

Other Libraries Included

Deployment

We recommend deploying your project to now.sh:

  1. create an account at https://zeit.co/
  2. install zeit cli: npm install -g now
  3. login through zeit-cli, now login
  4. change your domain alias in deploy.sh
  5. run npm run deploy

Congratulations, your project is online.