Skip to content

Deploying ToPan on Heroku #8

Description

@abdrehman98

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)
)


Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions