OCAP DApp starter template with @arcblock/ocap-js integrated, bootstrapped using @vue/cli.
中文版文档请猛击 README.cn.md
Make sure you have vue-cli installed.
vue create --preset ArcBlock/ocap-vue-starter my-ocap-dapp
git clone https://github.com/ArcBlock/ocap-vue-starter.git
cd ocap-vue-starter
yarn
yarn serve
If you are from China, use a mirror npm registry maybe better:
yarn --registry=https://registry.npm.taobao.org
- SDK Initialize:src/libs/ocap.js
- Query Demo:src/views/Query.vue
- Subscription Demo:src/views/Subscription.vue
- SDK Homepage
- SDK API Specification
- Bitcoin API and Response Formats
- Ethereum API and Response Formats
We recommend deploying your project to now.sh:
- create an account at https://zeit.co/
- install zeit cli:
npm install -g now
- login through zeit-cli,
now login
- change your domain alias in deploy.sh
- run
npm run deploy
Congratulations, your project is online.
The template
folder just duplicate some files and folders in the root folder, you should not change any files in this folder by hand, the recommended way to update template
folder is to run npm run prepublish
command.