ToPan icon indicating copy to clipboard operation
ToPan copied to clipboard

Deploying ToPan on Heroku

Open abdrehman98 opened this issue 5 years ago • 0 comments

I was trying to deploy ToPan on Heroku, I cloned the repo and installed dependencies locally and everything works fine. Then I used this buildpack https://github.com/virtualstaticvoid/heroku-buildpack-r, added dependencies to init.R file and also made a run.R file but my heroku app isnt working.

My init.R file:

init.R

Example R code to install packages if not already installed

my_packages = c("LDAvis", "XML", "xml2", "RCurl", "httr", "lda", "servr", "markdown", "data.table", "stringr", "plyr", "ggplot2", "jsonlite", "tsne", "DT")

install_if_missing = function(p) { if (p %in% rownames(installed.packages()) == FALSE) { install.packages(p) } }

invisible(sapply(my_packages, install_if_missing))


My run.R file: library(shiny) port <- Sys.getenv('PORT') shiny::runApp( appDir = getwd(), host = '0.0.0.0', port = as.numeric(port) )


abdrehman98 avatar Aug 26 '20 12:08 abdrehman98