Update readme

This commit is contained in:
2018-04-01 15:21:14 +02:00
parent 60de3d8a31
commit e7ff606891
2 changed files with 19 additions and 24 deletions
+18 -16
View File
@@ -17,10 +17,9 @@ You will need the following things properly installed on your computer.
## Installation
* `git clone <repository-url>` this repository
* `git clone git@github.com:67P/kredits-web.git` this repository
* `cd kredits-web`
* `npm install`
* `bower install`
## Running / Development
@@ -48,26 +47,29 @@ Specify what it takes to deploy your app.
## Working with locally deployed contracts
For development you might want to run your own development chain with your own development contracts.
The kredits-contracts helper scripts are available in kredits-web. See [kredits-contracts](https://github.com/67P/kredits-contracts) for more information.
For development you should checkout [truffle-kredits](https://github.com/67P/truffle-kredits).
See the [README](https://github.com/67P/truffle-kredits/#readme) how to setup `truffle-kredits`.
Start your parity node with a KreditsChain:
npm run kredits-parity
Run the following commands in `truffle-kredits`
* `ganache-cli -p 7545`
* `truffle migrate`
* `npm link`
Deploy the contracts to your local chain:
Run ipfs local
* `ipfs daemon --offline` See [IPFS](#ipfs) for the setup
npm run kredits-deploy
In `kredits-web`
* `npm link kredits-contracts`
* `ember serve`
Run kredits-web with your localy deployed contracts:
## IPFS
KREDITS_CONTRACT_ADDR=`kredits-inspect -c Kredits -r -w address` \
TOKEN_CONTRACT_ADDR=`kredits-inspect -c Token -r -w address` \
npm start
You need to have `./node_modules/.bin` in your path for this to work. Otherwise simply copy the contract addresses and set the environment variables manually.
Install IPFS with your favorite package manager and run
ipfs init
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["localhost:4200"]'
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "GET", "POST"]'
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Credentials '["true"]'
## Further Reading / Useful Links
+1 -8
View File
@@ -16,19 +16,12 @@
"repository": "https://github.com/67P/kredits-web",
"scripts": {
"start": "ember server",
"start-local": "WEB3_PROVIDER_URL=http://localhost:8545 KREDITS_PROVIDER_URL=http://localhost:8545 OPERATOR_CONTRACT_ADDR=`kredits-inspect -c Operator -r -w address` TOKEN_CONTRACT_ADDR=`kredits-inspect -c Token -r -w address` npm start",
"test": "ember test",
"postinstall": "bower install",
"build": "ember build",
"build-prod": "ember build --environment production",
"update-version-file": "bash scripts/update-version-file.sh",
"deploy": "npm run build-prod && npm run update-version-file && bash scripts/deploy.sh",
"kredits-console": "kredits-console",
"kredits-parity": "kredits-parity",
"kredits-deploy": "kredits-deploy",
"kredits-inspect": "kredits-inspect",
"kredits-seed": "kredits-seed",
"kredits-watch": "kredits-watch"
},
"devDependencies": {
"babel-preset-es2015": "^6.22.0",
@@ -60,7 +53,7 @@
"ember-truth-helpers": "1.3.0",
"ipfs-api": "^12.1.7",
"kosmos-schemas": "^1.1.2",
"kredits-contracts": "github:67P/truffle-kredits#master",
"kredits-contracts": "*",
"loader.js": "^4.0.10",
"tv4": "^1.3.0",
"bs58": "^4.0.1",