Prerequisites:


1. Node Version Manager

Captura de pantalla 2019-03-09 a las 12.07.55.png

Captura de pantalla 2019-03-09 a las 12.08.00.png


 

2. Node

Captura de pantalla 2019-03-09 a las 12.01.32.png


 

2.1 Go (Optional)


 

2.2 Ethereum Client (Optional)

Captura de pantalla 2019-03-09 a las 12.05.57.png

Captura de pantalla 2019-03-09 a las 12.03.13.png

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

Captura de pantalla 2019-03-09 a las 12.15.07.png

Captura de pantalla 2019-03-09 a las 12.13.08.png

$ 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

Captura de pantalla 2019-03-09 a las 12.09.07.png

Captura de pantalla 2019-03-09 a las 12.09.12.png

  • First Embark App

Captura de pantalla 2019-03-09 a las 12.27.11.png

  • Running your app

Captura de pantalla 2019-03-09 a las 12.27.40.png

Captura de pantalla 2019-03-09 a las 12.28.01.png

Open http://localhost:8000 to see the Dapp

687474703a2f2f692e696d6775722e636f6d2f61396464536a6e2e706e67.pngI’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.

Captura de pantalla 2019-03-09 a las 12.30.28.png

  • Embark Dapp structure

Captura de pantalla 2019-03-09 a las 12.29.18.png

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

Advertisements
Posted by:.

2 replies on “How to install Embark by Status in MacOS (Ethereum Dapp development)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s