Embark 2.2.0 - IPFS Orbit
To Update to 2.2.0
important
Embark's npm package has changed from embark-framework
to embark
, this sometimes can create conflicts. To update, first uninstall embark-framework 1 to avoid any conflicts with npm uninstall -g embark-framework
followed by npm install -g embark
to update from 2.1.4:
npm install -g [email protected]
afterwards make sure embark version
returns 2.2.0
In this release
Support for Orbit (IPFS pub/sub)
Previously only Whisper was supported in EmbarkJS which you could initialize with EmbarkJS.Messages.setProvider('whisper')
.
Now Orbit is also supported, Orbit is a protocol on top of IPFS for distributed real time communications that you can use in your Dapps, see bellow the talk in Devcon2:
To use it all you need to do is to set Orbit as the provider:
EmbarkJS.Messages.setProvider('orbit', {server: 'localhost', port: 5001})
(note: You'll need to use IPFS from master and run it as: ipfs daemon --enable-pubsub-experiment
)
Afterwards your communication code that worked with Whisper "just works" (tm) with Orbit as expected!
listening to messages
EmbarkJS.Messages.listenTo({topic: ["topic1", "topic2"]}).then(function(message) { console.log("received: " + message); })
sending messages
you can send plain text
EmbarkJS.Messages.sendMessage({topic: "sometopic", data: 'hello world'})
or an object
EmbarkJS.Messages.sendMessage({topic: "sometopic", data: {msg: 'hello world'}})
New command line options
the following options are not supported for embark run
:
- -p, --port [port] => port to run the dev webserver (default: 8000)
- -b, --host [host] => host to run the dev webserver (default: localhost)
- --noserver => disable the development webserver
- --nodashboard => simple mode, disables the dashboard
- --no-color => no colors in case it's needed for compatibility purposes
IPFS and SWARM deployment
The previous command to deploy to ipfs changed to embark deploy ipfs
. Now you can also do embark deploy swarm
to deploy your Dapp to Swarm.
Misc Bugfixes and Improvements
- support for solc 0.4.7
- support for web3.js 0.18.0
- fix for events in embarkjs (were only being triggered once)
- better automatic gas adjustment for deploying contracts
- support specifying web server port with -p or --port
- display errors in logs and status instead of crashing
Chatroom
To discuss about Embark or Dapp development, please join us at the gitter channel
Donations
If you like Embark please consider donating to 0xFA239D14c7117C3D2370B2a4c4238534391fadd9