Prerequisites:
1. Node Version Manager
2. Node
2.1 Go (Optional)
2.2 Ethereum Client (Optional)
How to run geth using rinkeby Ethereum test network node:
geth --rinkeby --datadir=~/.gophersland_ethereum_r1 --port=30304 --cache=2048 --rpc --rpcport=8546 --rpcapi=eth,web3,net,personal --syncmode=fast
IPFS (Optional but recommended)
$ tar xvfz go-ipfs.tar.gz
$ cd go-ipfs
$ ./install.sh
$ ipfs init
initializing IPFS node at /Users/darwin/.ipfs Error: ipfs configuration file already exists! Reinitializing would overwrite your keys. —> Typical Error!
However, if you really want to delete your old repository and start over you can delete the .ipfs
directory in /home/darwin/
and then run ipfs init
again.
Try running ipfs daemon --migrate=true
.
If you add the string,
hash=`echo 'Hello, Saburova!' | ./ipfs add -q`
Then, echo $hash
gives you QmadWRPHJ9YmbgwQNSsR7FubFUvBpjgXfPFXEPcgtC7ccJ
with the current defaults.
# Show the ipfs config API port to check it is correct > ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001 # Set it if it does not match the above output > ipfs config Addresses.API /ip4/127.0.0.1/tcp/5001 # Restart the daemon after changing the config # Run the daemon > ipfs daemon
EDIT: Found this in ~/.ipfs/config
:
{
"API": {
"HTTPHeaders": null
},
"Addresses": {
"API": "/ip4/127.0.0.1/tcp/5001",
"Gateway": "/ip4/127.0.0.1/tcp/8080",
"Swarm": [
"/ip4/0.0.0.0/tcp/4001",
"/ip6/::/tcp/4001"
]
},
...
So you can change that 8080 to be some other number that doesn’t conflict.
IPFS CORS support (Optional)
Solved it. Using
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Credentials '["true"]'
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "POST", "GET"]'
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Headers '["Authorization"]'
ipfs config --json API.HTTPHeaders.Access-Control-Expose-Headers '["Location"]'
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]'
Embark
- First Embark App
- Running your app
Open http://localhost:8000 to see the Dapp
I’m getting
No Blockchain node found
and this error in the dashboard:
TypeError: Cannot read property 'geth_bin' of undefined
at self.isClientInstalled (C:\Users\srramakr\AppData\Roaming\nvm\v8.11.2\node_modules\embark\lib\modules\blockchain_process\blockchain.js:151:134) │
at runCommand (C:\Users\srramakr\AppData\Roaming\nvm\v8.11.2\node_modules\embark\lib\modules\blockchain_process\blockchain.js:288:14) │
at ChildProcess.exithandler (child_process.js:282:5)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
- Embark comes with Ganache CLI (from the Truffle Suite), a blockchain node emulator. Run Embark Simulator better for development in local (instead of geth). Run in a separated Terminal Console.
- Embark Dapp structure
After finish the installation you will be ready to send/read from contracts, add/retrieve images form IPFS, register ENS name domains, etc.
By MrAddon
2 replies on “How to install Embark by Status in MacOS (Ethereum Dapp development)”