ToPan
ToPan copied to clipboard
Deploying ToPan on Heroku
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) )