Skip to content

Commit e9bd2ac

Browse files
committed
update readme
1 parent 96d1361 commit e9bd2ac

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,12 @@ methods in EmbarkJS contracts will be converted to promises.
311311
myContract.get().then(function(value) { console.log("value is " + value.toNumber) });
312312
```
313313

314+
events:
315+
316+
```Javascript
317+
myContract.eventName({from: web3.eth.accounts}, 'latest').then(function(event) { console.log(event) });
318+
```
319+
314320
**deployment**
315321

316322
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
366372
EmbarkJS.Storage.getUrl(hash);
367373
```
368374

375+
note: if not using localhost, the cors needs to be set as ```ipfs --json API.HTTPHeaders.Access-Control-Allow-Origin '["your-host-name-port"]```
376+
369377
EmbarkJS - Communication
370378
======
371379

0 commit comments

Comments
 (0)