Starter Guide to R Plumber + Slack (a detailed walkthrough)

Context & Inspiration

Tutorial

install.packages(‘plumber’)install.packages(‘analogsea’)analogsea::do_oauth(reauth = T)plumber_droplet <- plumber::do_provision(region=’nyc1')
analogsea::install_r_package(plumber_droplet, c(‘config’,
‘tidyverse’,
‘httr’,
‘urltools’,
‘plumber’))
SLACK_SIGNING_SECRET = 2323342343432dwdoyoi234343
default:
base_url: “http://142.93.3.93/plumber_demo"

rsconnect:
base_url: “http://142.93.3.93/plumber_demo"
droplet_names <- analogsea::droplets()
plumber_droplet <- names(droplet_names)[2]
preflight_cmd <- paste0(“Sys.setenv(‘SLACK_SIGNING_SECRET’ = ‘“,
Sys.getenv(‘PLUMBER_SLACK_DEMO_SIGNGING_SECRET’), “‘); “)
plumber::do_deploy_api(droplet = plumber_droplet,
path = ‘plumber_demo’,
localPath = ‘dev/plumber_slack_demo’,
swagger = T, port = 8002,
preflight = preflight_cmd)
ssh-copy-id -f -i ~/.ssh/id_rsa.pub root@142.93.3.93
Number of key(s) added: 1Now try logging into the machine, with: “ssh ‘root@142.93.3.93’”
and check to make sure that only the key(s) you wanted were added.
plumber::do_deploy_api(droplet = plumber_droplet,
path = ‘plumber_demo’, localPath = ‘dev/plumber_slack_demo’,
swagger = T, port = 8002,
preflight = preflight_cmd)
# sudo apt-get update
# sudo apt-get install -y libssl-dev
# sudo apt-get install libcurl4-openssl-dev
# sudo apt-get install libxml2-dev
analogsea::install_r_package(plumber_droplet, ‘tidyverse’)
analogsea::install_r_package(plumber_droplet, c(‘httr’, ‘config’)
tail /var/log/syslog

Next, build something amazing

Other Resources

--

--

--

I love to build things | Startup | ex-Facebook | ex-PayPal | More @ about.ehasan.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

The Art of Tracing in the world of microservices

Type A is not Type B — let the type system guides you

What I Learned at Work this Week: Python Arrow Library (and a bonus)

TryHackMe: Break Out The Cage

Hackerrank — Abstract Classes — Polymorphism Solution — C++

Terraform Workspaces For Beginners

Create A Robust Predictive Fantasy Football DFS Model In Python Pt. 2

Tokel AMA & Social Media Giveaway

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Emad Hasan

Emad Hasan

I love to build things | Startup | ex-Facebook | ex-PayPal | More @ about.ehasan.com

More from Medium

From XML strings/files to R data frames — PartIII

Check, Install, Require Packages (Function)

Is Central Limit Theorem(CLT) true?

Analyzing data with Python and R in MS SQL Server — Part I