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