From e7ff606891dcfe3b272133b766bc0ae7d5967838 Mon Sep 17 00:00:00 2001 From: Manuel Wiedenmann Date: Sun, 1 Apr 2018 15:21:14 +0200 Subject: [PATCH] Update readme --- README.md | 34 ++++++++++++++++++---------------- package.json | 9 +-------- 2 files changed, 19 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index f13f0d6..b8569ec 100644 --- a/README.md +++ b/README.md @@ -17,10 +17,9 @@ You will need the following things properly installed on your computer. ## Installation -* `git clone ` 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 diff --git a/package.json b/package.json index 23012ba..c5ea279 100644 --- a/package.json +++ b/package.json @@ -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",