Skip to content

Commit a2ae5b9

Browse files
committed
Express example doc
Signed-off-by: Fabio José <[email protected]>
1 parent 951008d commit a2ae5b9

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

examples/express-ex/README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Express Example
2+
3+
## To Start
4+
5+
```bash
6+
npm start
7+
```
8+
9+
## To Post an Event
10+
11+
__A Structured One__
12+
13+
```bash
14+
curl -X POST \
15+
-d'@../payload/v02/structured-event-0.json' \
16+
-H'Content-Type:application/cloudevents+json' \
17+
http://localhost:3000/
18+
```
19+
20+
__A Binary One__
21+
22+
```bash
23+
curl -X POST \
24+
-d'@../payload/data-0.json' \
25+
-H'Content-Type:application/json' \
26+
-H'ce_specversion:0.2' \
27+
-H'ce_type:com.github.pull.create' \
28+
-H'ce_source:https://github.com/cloudevents/spec/pull/123' \
29+
-H'ce_id:45c83279-c8a1-4db6-a703-b3768db93887' \
30+
-H'ce_time:2019-06-21T17:31:00Z' \
31+
http://localhost:3000/
32+
```
33+
__A Batch One__
34+
35+
TODO

0 commit comments

Comments
 (0)