Does Shiny Server require apps to be split into ui.R and server.R?

Apps that are in just one app.R file which run just fine in R Studio seem to give an error when used with Shiny Server.

The same exact apps work in Shiny Server if I split them up into ui.R and server.R, which make me think that apps must be in this form for them to be used with Shiny Server. Is this correct, or am I just mistaken somewhere?

Sorry if this is already mentioned in documentation somewhere, I have read some of the admin guide but saw no mention of this

Shiny Server works with both single file and separate files. Can you provide a small reproducible example for your issue?

Have a look at this resources, to see how to create one for a shiny app