Broadcast coding from RStudio to the world with livecode package

Viewed 90

livecode is a R package for broadcasting code for live code demonstrations. I would like to use it for teaching R in online classrooms. The package can be installed from github and runs excellent on my computer and the result is very promising. Once installed from github:

remotes::install_github("rundel/livecode")
library(livecode)

You can start your web server via server = livecode::serve_file(). Next your browser pops up and shows you a syntax-hightlighted live broadcast of your coding. A benefit in comparison to a screenshare of code is that this broadcast delivers plain text which is scalable from the recipient. I tested it on my phone, worked great. No more scaling of RStudio in order to make people see your code. Furthermore text (the script) can be saved from browser.

enter image description here

https://www.rstudio.com/resources/rstudioconf-2020/livecode-broadcast-your-live-coding-sessions-from-and-to-rstudio/

My problem is, I cannot figure out how to configure my private work environment such that this broadcast can be received from outside my local network. serve_file can specify an ip and port. I tried to set it to my computer ip (found via ipconfig) and open port 80 (for http) in my router.

Can anybody support me in how to make a livecode broadcast to the global internet?

1 Answers

I contacted the package author and he suggested to follow this blogpost:

https://bitsandbricks.github.io/post/code-live-from-rstudio-and-share-it-with-the-world-in-real-time/

It suggests to use ngrok, a service that provides tunnels to localhost. This acutally worked for me for some seconds, killing my livecode package in the next moment. At the moment, I can no longer use livecode not even as a localhost. I assume this error may just be my fault. The blogpost provides an easy answer to my question.

Related