mkdir -p ~/Sites/hyperledger-fabric-react-hyperledger-fabric-react-client
cd ~/Sites/hyperledger-fabric-react-client
nvm install --lts
nvm use --lts
npm install -g create-react-app
create-react-app hyperledger-fabric-react-client
cd hyperledger-fabric-react-client && yarn start
yarn add \
react-router \
react-router-dom \
redux \
react-redux \
redux-logger \
redux-thunk \
axios \
material-ui@next \
material-ui-icons
yarn add redux-devtools-extension -D
Allows you to write action creators that return a function instead of an action.
The thunk can be used to delay the dispatch of an action, or to dispatch only if a certain condition is met.
The inner function receives the store methods dispatch and getState as parameters.
A thunk is a function that wraps an expression to delay its evaluation.
Promise based HTTP hyperledger-fabric-react-client for the browser and node.js
- Make XMLHttpRequests from the browser.
- Make http requests from node.js
- Supports the Promise API.
- Intercept request and response.
- Transform request and response data.
- Cancel requests.
- Automatic transforms for JSON data.
- hyperledger-fabric-react-client side support for protecting against XSRF.
##W React Router
nvm install --lts
nvm use --lts
npm install -g passport-github
cd ~/Sites/car-manufacture-network
nvm install --lts
nvm use --lts
export COMPOSER_PROVIDERS='{
"github": {
"provider": "github",
"module": "passport-github",
"hyperledger-fabric-react-clientID": "SECRET_hyperledger-fabric-react-client_ID",
"hyperledger-fabric-react-clientSecret": "hyperledger-fabric-react-client_SECRET",
"authPath": "/auth/github",
"callbackURL": "/auth/github/callback",
"successRedirect": "/",
"failureRedirect": "/"
}
}'
echo $COMPOSER_PROVIDERS
composer ps
composer card list
composer-rest-server -c admin@vehicle-manufacture-network -m true
cd ~/Sites/car-manufacture-network
nvm install --lts
nvm use --lts
composer ps
composer card list
composer-playground -p 5000
Happy Hacking!!!