example

A div below shows file log.txt, which is produced by the server. The server appends a new log message to that file every second, and a div below also shows that, implementing a "live log" feature. JS code on this page first fetches /api/log/static that returns log.txt contents, then fetches /api/log/live that does not return, but feeds chunks of data as they arrive (live log).
You can also use `curl` command-line utility to see live logs:
`curl localhost:8000/api/log/live`
Static

Live