I need to include a js file in a single-file shiny app. I tried to work with a two file app (classic UI-Server) and it works, but when I try to add the Javascript file into a single-file app, using the same structure, the browser can't find the js file.
This is the structure that I use into a two-file application, and works properly:
├── server.R
├── ui.R
└── www
└── main.js
And this is the tag that I use to add the js file in the ui.R code:
tags$head(tags$script(src="main.js"))