on master help sign in
a couple more examples.md changes
0a3be37tinnus-napbus
arvo/eyre/examples.md+5−1
@@ -94,7 +94,7 @@ id: 0
94data: {"ok":"ok","id":1,"response":"poke"}
94data: {"ok":"ok","id":1,"response":"poke"}
95```
95```
96
96
97−Normally this event stream would be handled by an EventSource object in Javascript or the equivalent in whatever other language you're using. Here, though, we'll continue using `curl` for simplicity.
97+Normally this event stream would be handled by an EventSource object or similar in Javascript or the equivalent in whatever other language you're using. Here, though, we'll continue using `curl` for simplicity.
98
98
99Leaving the event stream connection open, in another shell session on unix we'll try subscribing to the watch path of a Gall agent - the `/updates` watch path of `graph-store` in this case.
99Leaving the event stream connection open, in another shell session on unix we'll try subscribing to the watch path of a Gall agent - the `/updates` watch path of `graph-store` in this case.
100
100
@@ -268,6 +268,8 @@ You can refer to the [%connect](@/docs/arvo/eyre/tasks.md#connect) section of th
268
268
269Here's a Gall agent that demonstrates this method. It binds the URL path `/foo`, serves `<h1>Hello, World!</h1>` for GET requests and a `405` error for all others. It also prints debug information to the terminal as various things happen.
269Here's a Gall agent that demonstrates this method. It binds the URL path `/foo`, serves `<h1>Hello, World!</h1>` for GET requests and a `405` error for all others. It also prints debug information to the terminal as various things happen.
270
270
271+Note that this example does a lot of things manually for demonstrative purposes. In practice you'd likely want to use a library like `/lib/server.hoon` to cut down on boilerplate code.
272+
271`eyre-agent.hoon`
273`eyre-agent.hoon`
272
274
273```hoon
275```hoon
@@ -490,6 +492,8 @@ You can refer to the [%serve](@/docs/arvo/eyre/tasks.md#serve) section of the [I
490
492
491Here's a very simple generator that will just echo back the body of the request (if available) along with the current datetime. You can save it in the `/gen` directory and `|commit %home`.
493Here's a very simple generator that will just echo back the body of the request (if available) along with the current datetime. You can save it in the `/gen` directory and `|commit %home`.
492
494
495+Note that this example does some things manually for demonstrative purposes. In practice you'd likely want to use a library like `/lib/server.hoon` to cut down on boilerplate code.
496+
493`eyre-gen.hoon`
497`eyre-gen.hoon`
494
498
495```hoon
499```hoon