Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a landing page at root url.
Notes for future self:
When serving static files at '/', the docs endpoint doesn't work (returns 404). This is being resolved by the plumber team (rstudio/plumber#748). For now, I just don't add docs.
On initial deployment, I was able to access landing page and '/available'. But '/data' wasn't working. After figuring out how to access the plumber logs I was getting the error
<simpleError: user is not allowed to do action [createIndex] on [data.fs.chunks]>
. This is an issue with the underlying C library for mongolite. See jeroen/mongolite#190. I was able to resolve this by setting the server account to allow both read and write access to the MongoDB database. Before, it was read only.