-
Notifications
You must be signed in to change notification settings - Fork 90
Expand file tree
/
Copy pathweb.json
More file actions
25 lines (25 loc) · 1.25 KB
/
Copy pathweb.json
File metadata and controls
25 lines (25 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{
"$comment": "Sample rclnodejs/web config consumed by `npx rclnodejs-web web.json` from a project that has rclnodejs installed. Inside a checkout of the rclnodejs repo itself, run `node ../../../bin/rclnodejs-web.js web.json` instead — npx resolves `rclnodejs` against the enclosing package.json, which *is* rclnodejs here, so it finds no bin to run. Every key is optional; the defaults shown match the CLI defaults.",
"port": 9000,
"path": "/capability",
"node": "rclnodejs_web_demo",
"http": {
"$comment": "HTTP transport for `call` and `publish` (curl-able, AI-agent friendly). `sse` also exposes `subscribe` over Server-Sent Events; `cors: \"*\"` allows any origin so a cross-origin browser EventSource can connect. `host` binds to loopback only, shown here to document the option (the default without it, `::`, binds all interfaces but displays the same). Matches the bundled runtime.mjs.",
"port": 9001,
"host": "localhost",
"sse": true,
"cors": "*"
},
"expose": {
"call": {
"/add_two_ints": "example_interfaces/srv/AddTwoInts"
},
"publish": {
"/web_demo_chatter": "std_msgs/msg/String"
},
"subscribe": {
"/web_demo_chatter": "std_msgs/msg/String",
"/topic": "std_msgs/msg/String"
}
}
}