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 ## Installation
* `git clone <repository-url>` this repository * `git clone git@github.com:67P/kredits-web.git` this repository
* `cd kredits-web` * `cd kredits-web`
* `npm install` * `npm install`
* `bower install`
## Running / Development ## Running / Development
@@ -48,26 +47,29 @@ Specify what it takes to deploy your app.
## Working with locally deployed contracts ## Working with locally deployed contracts
For development you might want to run your own development chain with your own development contracts. For development you should checkout [truffle-kredits](https://github.com/67P/truffle-kredits).
The kredits-contracts helper scripts are available in kredits-web. See [kredits-contracts](https://github.com/67P/kredits-contracts) for more information. See the [README](https://github.com/67P/truffle-kredits/#readme) how to setup `truffle-kredits`.
Start your parity node with a KreditsChain: Run the following commands in `truffle-kredits`
* `ganache-cli -p 7545`
npm run kredits-parity * `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` \ Install IPFS with your favorite package manager and run
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.
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 ## Further Reading / Useful Links
+1 -8
View File
@@ -16,19 +16,12 @@
"repository": "https://github.com/67P/kredits-web", "repository": "https://github.com/67P/kredits-web",
"scripts": { "scripts": {
"start": "ember server", "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", "test": "ember test",
"postinstall": "bower install", "postinstall": "bower install",
"build": "ember build", "build": "ember build",
"build-prod": "ember build --environment production", "build-prod": "ember build --environment production",
"update-version-file": "bash scripts/update-version-file.sh", "update-version-file": "bash scripts/update-version-file.sh",
"deploy": "npm run build-prod && npm run update-version-file && bash scripts/deploy.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": { "devDependencies": {
"babel-preset-es2015": "^6.22.0", "babel-preset-es2015": "^6.22.0",
@@ -60,7 +53,7 @@
"ember-truth-helpers": "1.3.0", "ember-truth-helpers": "1.3.0",
"ipfs-api": "^12.1.7", "ipfs-api": "^12.1.7",
"kosmos-schemas": "^1.1.2", "kosmos-schemas": "^1.1.2",
"kredits-contracts": "github:67P/truffle-kredits#master", "kredits-contracts": "*",
"loader.js": "^4.0.10", "loader.js": "^4.0.10",
"tv4": "^1.3.0", "tv4": "^1.3.0",
"bs58": "^4.0.1", "bs58": "^4.0.1",