From e9bd2acef5e3310bbc24fb22699ef42aa4c17570 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Mon, 6 Mar 2017 21:53:36 -0500 Subject: [PATCH] update readme --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index ce29dc56..ac3cab76 100644 --- a/README.md +++ b/README.md @@ -311,6 +311,12 @@ methods in EmbarkJS contracts will be converted to promises. myContract.get().then(function(value) { console.log("value is " + value.toNumber) }); ``` +events: + +```Javascript + myContract.eventName({from: web3.eth.accounts}, 'latest').then(function(event) { console.log(event) }); +``` + **deployment** Client side deployment will be automatically available in Embark for existing contracts: @@ -366,6 +372,8 @@ The current available storage is IPFS. it can be initialized as EmbarkJS.Storage.getUrl(hash); ``` +note: if not using localhost, the cors needs to be set as ```ipfs --json API.HTTPHeaders.Access-Control-Allow-Origin '["your-host-name-port"]``` + EmbarkJS - Communication ======