Created
November 3, 2025 09:38
-
-
Save alekrutkowski/1ddadde02701b3908935f35fba7cd30e to your computer and use it in GitHub Desktop.
Revisions
-
alekrutkowski created this gist
Nov 3, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,34 @@ # Save it as /srv/shiny-server/your_app_name/app.R library(shiny) ui <- function(request) { query <- parseQueryString(request$QUERY_STRING) txt <- query$txt a <- as.numeric(query$a) b <- as.numeric(query$b) if (is.null(txt) || length(a)==0 || length(b)==0) httpResponse( status = 400, content_type = "text/plain; charset=UTF-8", content = 'One of the GET parameters (txt or a or b -- each case sensitive!) not provided!' ) else httpResponse( status = 200, content_type = "text/plain; charset=UTF-8", content = paste(toupper(txt), a + b, sep='\n') ) } server <- function(input, output, session) {} shinyApp(ui = ui, server = server) # test: # https://localhost:8787/your_app_name/?txt=hello%20world&a=12&b=13 # or # https://your.shinyserver.domain/your_app_name/?txt=hello%20world&a=12&b=13