hackathon-registration-dapp/README.md

33 lines
1.2 KiB
Markdown
Raw Normal View History

2018-10-03 12:45:56 +00:00
# hackathon-registration-dapp
2018-11-26 12:51:22 +00:00
### Prerequisites:
- Geth, IPFS and Embark installed
2018-10-03 18:28:33 +00:00
### Installation:
2018-10-03 12:45:56 +00:00
```
git clone https://github.com/status-im/hackathon-registration-dapp.git
cd hackathon-registration-dapp
npm install
```
2018-10-20 12:40:05 +00:00
### Configuring dapp
Edit `./app/js/config.js`. Edit the ens-usernames dApp URL, and the API endpoint
*NOTE*: The server caches the .js/.css files, so in order to see the new changes, edit `./app/index.html` to point to a new version of the files, and edit `./embark.json` so the files are generated with a new name. Then, `embark build testnet/livenet` after changes.
2018-10-05 02:05:09 +00:00
### Background service
A nodejs service was created to receive funding requests. It requires a geth light node to run
0. `chmod 600 server/config.js`
1. Edit `server/config.js` and set the contract address and the private key of the controller address.
2018-10-05 02:31:39 +00:00
2. `node server/main.js`
2018-10-03 12:45:56 +00:00
2018-11-26 12:51:22 +00:00
### Running the dapp in a development environment
2018-10-05 02:05:09 +00:00
0. `embark run`
1. Browse http://localhost:8000/index.htm?CODE_TO_REDEEM
2018-10-20 12:40:05 +00:00
### Generating codes (IN DEV)
To generate the codes, execute `node server/codegen.js`. This comand will output a `.\codes.txt` file, and the proof and merkle root used for the contract in `server/merkle.js`
2018-10-03 12:45:56 +00:00