View source: R/middleware_static.R
Binds to get requests that aren't handled by specified paths. Should support
all filetypes; returns image and octet-stream types as a raw string.
Note: the path argument is not related to the file being served. If
path is given, the static file middleware will bind to path,
however for finding the files on the local filesystem it will strip
path from the file location. For example, let's assume
path='my_path', the following url /my_path/file/to/serve.html
will serve the file file/to/serve.html from the root_path folder.
1 | serve_static_files(jug, path = NULL, root_path = getwd())
|
jug |
the jug instance |
path |
the path to bind to, default = NULL (all paths) |
root_path |
the file path to set as root for the file server |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.