modular shiny app

Hi Shiny devs!
I'm attempting to start a shiny app using modules.

I have some doubts that make my app not start or crash.

Basically I want a dummy menu with 3 widgets:

  • drop down menu with some country names
  • button to submit the country name input
    this button later on will be connected to create a word file with the name of the country.
  • button 2 or downloadbutton that will download the word doc created.

I have been reading all about shiny app modules and also I am aware of using moduleServer() for shiny versions 0.15 or above. I'm using 0.15.0.

I know so far I haven't implemented "commented out" the server side of each module.
It doesn't work anyway.

Any pointers on how to get going will be really appreciated.

In the following link I found a repo which uses two modules:

My question is:
the name of the R file module eg: UploadModule.R
is the same name as the function module server.
uploadModule <- function(input, output, session, ...) {
userFile <- reactive({ …. }) …. }

When calling the module in the app.R
datafile <- callModule(uploadModule, "datafile")
This the bold uploadModule the actual server function from the module named the same?
Do we have to have same names?

As mentioned earlier

Any input is really appreciated! I'm sure it will help me to become a better shiny app dev.

Hope you have a great day.

Shiny Regards,


The shiny moduleServer is not meant to be used with callModule which was for the previous shiny modules framework.

I recommend the online book 'mastering shiny' which has a great chapter on shiny modules.

Fantastic thanks for the pointer! :slight_smile:

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.