Skip to content

Commit 30ebf43

Browse files
committed
Address comments
1 parent 0421c25 commit 30ebf43

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,10 @@ how much glue you want to write.
133133
); // reply.sum is typed as `${number}n`
134134
```
135135

136-
No SDK needed for subscribe — any browser streams a live ROS 2 topic via built-in `EventSource`:
136+
No SDK needed for subscribe — with the HTTP/SSE transport enabled (`--http-sse`, plus `--http-cors` for cross-origin), any browser streams a live ROS 2 topic via built-in `EventSource`:
137137

138138
```js
139-
const es = new EventSource('http://host:9000/capability/subscribe/chatter');
139+
const es = new EventSource('http://host:9001/capability/subscribe/chatter');
140140
es.onmessage = (e) => console.log(JSON.parse(e.data)); // live ROS 2 messages
141141
```
142142

scripts/npmjs-readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,10 @@ Then `import * as rclnodejs from 'rclnodejs'` works the same as the JavaScript e
110110
); // reply.sum is typed as `${number}n`
111111
```
112112

113-
No SDK needed for subscribe — any browser streams a live ROS 2 topic via built-in `EventSource`:
113+
No SDK needed for subscribe — with the HTTP/SSE transport enabled (`--http-sse`, plus `--http-cors` for cross-origin), any browser streams a live ROS 2 topic via built-in `EventSource`:
114114

115115
```js
116-
const es = new EventSource('http://host:9000/capability/subscribe/chatter');
116+
const es = new EventSource('http://host:9001/capability/subscribe/chatter');
117117
es.onmessage = (e) => console.log(JSON.parse(e.data)); // live ROS 2 messages
118118
```
119119

0 commit comments

Comments
 (0)