- The tools that we used are 'npm', 'yarn', 'ganache', so please install these tools firstly.
- The contract compiling and migrating tool is truffle, the commond is following: sudo npm install -g truffle sudo yarn global add truffl
- Use "ganache" to create our private chain:
- open the 'ganache' software, and choose the 'quikestart'
- click the 'setting' button in the upper right corner
- in the 'workspace' page, click 'add project' and select file './truffle-config.js'
- in the 'server' page, change the port to 8545
- click 'save and restart' in the upper right corner
- Get the contract addtress:
- locate to the crowdfunding-dapp-master, and open the terminal
- run: truffle compile truffle migrate
- go back to the 'ganache' software, and select'contracts' tab in the topest
- copy the address of the contract 'crowdfunding'
- open file './crowdfunding/src/api/contract.ts', find the 7th line, and replace this addtress with the previous one, which should start with '0x'.
- Compile and migrate the contract:
- locate to the crowdfunding-dapp-master, and open the terminal
- run: truffle compile truffle migrate
- copy the file './build/contracts/CrowdFunding.json' and paste it to './crowdfunding/src/api/'
- Run the front-end server and the web
- relocate to the './crowdfunding/' and run the terminal
- run: sudo yarn sudo yarn serve
- Test the local webpage:
- go to the 'localhost:8080'
- add the account to the wallet, and connect to the 'localhost:8545' to get the ETH
- test whatever you want