You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we'd have to agree on a series of files to check since ambiorix does not dictate the file naming. good candidates for this:
app.R: a general name (kind of a consensus in the R community?)
index.R: for frontend apps
server.R: for JSON data APIs
a very naive & brute-force approach would be to check for the existence of the string "Ambiorix$new" in the file (since that is the way to instantiate an ambiorix app).
Here plumber and shiny use the principle of convention over configuration. In many other languages frameworks you have a routes file always in the same place and it's easy to check it. In Ambiorix, the creation and routes can be in any file (or inside another package)
If we go for option 2, I think we could have has_ambiorix_new_dir function (or similar name) to make it clar that looks Ambiorix::new in all .R files of the directory.
I use utility functions like this to determine if a folder / file contains a shiny app or plumber API.
I cannot come up with a way to do this for an ambiorix app.
Perhaps there can be a function that takes a file / path that contains an app and returns that
Ambiorix
object?The text was updated successfully, but these errors were encountered: