| start_update_feed_server | R Documentation |
Runs update-feed-server.js with Node.js to serve dir on 127.0.0.1 at
a free port, and waits for the address it prints.
start_update_feed_server(dir, timeout = 10)
dir |
Folder to serve. |
timeout |
Seconds to wait for the address. |
The server does not outlive the R session that started it. It is started
and held with interrupts suspended, so from then on an error or an
interrupt before its address arrives kills it here, and
stop_update_feed_server() kills it later. Supervision is set up after
that, since it can take a moment the first time and can fail; a failure
ends the server and is reported as such. If the returned list is garbage
collected, processx kills the server, so keep the list for as long as the
feed is in use. If R exits or dies without running exit handlers,
processx's supervisor kills the server, and the server also exits by itself
once R's end of its standard input closes. Only R holds that end: processx
keeps it from being inherited by any other child process.
A list with process, the processx::process running the server,
and url, its address, such as "http://127.0.0.1:43210/".
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.