Skip to content

Commit 6b859f1

Browse files
committed
Docs for examples
Signed-off-by: Fabio José <fabiojose@gmail.com>
1 parent 9b98aad commit 6b859f1

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

README.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ Official CloudEvents' SDK for JavaScript.
1212

1313
Before create an awesome PR, please read our [guidelines](./CONTRIBUTING.md).
1414

15+
## Examples
16+
17+
To see working examples, point to [examples](./examplpes).
18+
1519
## Versioning
1620

1721
### Before Spec reaches 1.0
@@ -165,8 +169,19 @@ binding.emit(cloudevent)
165169
console.error(err);
166170
});
167171
```
172+
#### Receiving Events Using Express
173+
174+
See how to listen to events using
175+
[express](https://github.com/expressjs/express).
176+
177+
```js
178+
179+
180+
```
181+
182+
#### Receiving Using our Simple HTTP Server
168183

169-
#### Receiving
184+
See how to listen to events using out simple http server.
170185

171186
```js
172187
var Cloudevent = require("cloudevents-sdk");
@@ -181,7 +196,7 @@ var config = {
181196
// The binding instance
182197
var binding = new Cloudevent.bindings["http-structured0.2"](config);
183198

184-
binding.receive()
199+
binding.listen()
185200
.then(cloudevent => {
186201
// do something with event
187202
})

0 commit comments

Comments
 (0)