Skip to content

Latest commit

 

History

History
59 lines (49 loc) · 1.34 KB

README.md

File metadata and controls

59 lines (49 loc) · 1.34 KB




Template for NEAR dapps

Features

  • Create NEAR dapps with a React frontend 🐲
  • We got Gulp! 💦
  • We got Corgis? 🐶

Requirements

IMPORTANT: Make sure you have the latest version of NEAR Shell and Node Version > 10.x
  1. node and npm
  2. near shell install with
npm i -g near-shell

3.(optional) install yarn to build

npm i -g yarn

To run on testnet

Step 1: Create account for the contract and deploy the contract. In the terminal

near login

click the link and create your own contract ID

Step 2: modify src/config.js line that sets the contractName. Set it to id from step 1.

const CONTRACT_NAME = "contractId"; /* TODO: fill this in! */

Step 3: Finally, run the command in your terminal.

npm install
npm run(yarn) prestart
npm run(yarn) start

The server that starts is for static assets and by default serves them to localhost:3000. Navigate there in your browser to see the app running!

To Explore

  • assembly/main.ts for the contract code
  • src/index.html for the front-end HTML
  • src/main.js for the JavaScript front-end code and how to integrate contracts
  • src/app.js for the first react component